You are on page 1of 64

SD CARD INTERFACE USING FPGA FOR MULTIMEDIA

APPLICATIONS

A PROJECT REPORT

Submitted by

SAKTHEKANNAN M S (212220060228)

UDAYA KRISHNAN M (212219060284)

In partial fulfilment for the award of the degree


of
BACHELOR OF ENGINEERING
in
ELECTRONICS & COMMUNICATION ENGINEERING

SAVEETHA ENGINEERING COLLEGE (AUTONMOUS) ANNA

UNIVERSITY: CHENNAI 600 025

APRIL 2023
ANNA UNIVERSITY: CHENNAI 600 025

BONAFIDE CERTIFICATE

Certified that this report titled “SD CARD INTERFACE USING FPGA FOR
MULTIMEDIA APPLICATIONS” is the bona-fide work of “SAKHTEKANNAN M
S (212219060228), UDAYA KRISHNAN M (212219060284), YOGAVIGNES B M
(212219060302)” who carried out the work under my supervision.

SIGNATURE SIGNATURE
Dr. SRIGITHA S NATH, M.E., Ph.D Dr. SRIGITHA S NATH, M.E., Ph.D
HEAD OF THE DEPARTMENT SUPERVISOR
Professor Assistant Professor
Department of ECE, Department of ECE,
Saveetha Engineering College, Saveetha Engineering College,
Thandalam, Thandalam,
Chennai - 602105 Chennai-602105

Submitted for the project viva-voce examination held on ________________.

INTERNAL EXAMINER EXTERNAL EXAMINER


PROJECT APPROVAL SHEET

The project sheet “SD CARD INTERFACE USING FPGA FOR MULTIMEDIA
APPLICATIONS” submitted by “SAKTHEKANNAN M S (212219060228),
UDAYA KRISHNAN M (212219060284), and YOGAVIGNES B M
(212219060302)” is approved for submission, as partial requirement for the
award of the Degree of Bachelor of Engineering in Electronics and
Communication, Anna University during the academic year 2022-2023.

Submitted for the project viva-voce examination held on

INTERNAL EXAMINER EXTERNAL


EXAMINER
ACKNOWLEDGEMENT

If words were considered as symbols of approval and token of acknowledgement,


then let words play the heralding role of not praising and glorification but also to
exhibit the deeply embedded feelings of thanks and gratefulness.

We wish to express our gratitude to our Founder president, Dr. N.M. Veeraiyan,
President Dr. V. Saveetha and Director Dr. S. Rajesh and for providing us with
the facilities for the completion of our project. We also thank our principal
Dr.N.Duraipandian , M.E.Ph.D., for his continuous support and encouragement
in carrying out our project work. Also, our thanks to Dr. Srigitha S Nath M.E.,
Ph.D., Head of the Department, Electronics and Communication Engineering of
our college for providing us facilities and permission to carry out our project work

We mention our special thanks to our project coordinator Dr. K. Mahendran


M.E., Ph.D., Assistant Professor, Department of Electronics and Communication
Engineering for his wisdom, guidance, and constant encouragement. We manifest
cut deep sense of gratitude to our internal guide Dr. Srigitha S Nath M.E, Ph.D.,
Assistant professor, Department of Electronics and Communication Engineering
for his encouragement and faith in as though this endeavor.

We take this opportunity to acknowledge the efforts to staff members and


friends at Saveetha Engineering College for their sincere cooperation in guiding us.
Finally, we express our deepest gratitude to our family, for their constant
encouragement, support and motivation throughout under graduate career and for
always being there for us.
TABLE OF CONTENTS

CHAPTER NO. TITLE PAGE NO.

ABSTRACT
LIST OF TABLE xvi

LIST OF FIGURES xviii

LIST OF SYMBOLS xxvii

1. INTRODUCTION 1

1.1 Introduction of Project 1

1.2 Introduction of Domain 2

1.2.1 Image Enhancement 5

1.2.2 Digital Image processing 12

1.2.3 Image Analysis 30

1.3 Objective of the problem 45

1.4 Scope of the project 58

2. LITERATURE REVIEW 69

2.1 GENERAL 75
3. PROBLEM STATEMENT AND 69
METHODOLOGY

3.1 PROBLEM DEFINITION 75

3.2 METHODOLOGY 99

3.2.1 Existing System 100

3.2.2 Proposed System 51


3.3 SYSTEM ARCHITECTURE 56

3.4 UML DIAGRAMS

3.4.1 Use case Diagram 56


3.4.2 Class Diagram 56
3.4.3 Deployment Diagram
3.4.4 Component Diagram

4. SYSTEM IMPLEMENTATION 69

4.1 MODULE DESCRIPTION 75

4.2 ALGORITHM OF PROPOSED WORK 99

4.3 Flow chart 100


4.4 Comparative study of Existing and proposed system 52

5. LITERATURE REVIEW 69

2.1 GENERAL 75
2.2 .......... 99

2.2 ……………. 100

ABSTRACT

The medical industry is advancing with the innovation of new technologies; newer
healthcare technology and treatment procedures are being developed. Biotechnology is the base
for all these advancement in technology. With the advent of several pollutants, cosmetics and
chemicals into our day to day lives, the health of individuals has been deteriorating every day.
These not only effects physical or mental health, but also change our lifestyles. This project work
concentrates on identification of skin cancer, caused by one of the above-mentioned conditions.
The images are processed using combinations of Deep learning and image processing to detect
the stage of cancer. Images of the affected area are captured with the help of derma scope.
Several algorithms have been proposed to detect skin cancer but most of the inputs are fed
manually. The main objective of this project is to develop a Deep learning algorithm which
requires minimal intervention of human. The tool we have used for the detection of cancer cells
is MATLAB. At last ML classifier is used to classify.

In our project we will be using the following algorithms such as LeNet, ResNet, AlexNet
and VGG 16 and its accuracy is been calculated and well compared to other algorithms. From
the results its proved that ResNet works better than other algorithms interms of accuracy.

LIST OF TABLES

TABLE NO NAME OF THE TABLE PAGE NO

1.1 PIN FUNCTIONS OF SD MODE 5

1.2 COMMANDS OF SD CARD FOR SPI MODE 6


COMPARISON OF ONE-BIT SD MODE, 4-BIT
3.1 SD MODE, SPI MODE 24

COMPARISON BETWEEN EXISTING


5.1 METHODS AND OUR METHOD 46
LIST OF FIGURES

FIGURE NO NAME OF THE FIGURE PAGE NO

1.1 BLOCK DIAGRAM OF SD CARD 3

1.2 MEMORY ARCHITECTURE OF SD CARD 4

SD CARD COMMAND RESPONSE 1 IN SPI


1.3 MODE 7

SD CARD COMMAND RESPONSE 2 IN SPI


1.4 MODE 8

SD CARD COMMAND RESPONSE 3 IN SPI


1.5 MODE 8

1.6 FPGA DEVELOPMENT BOARD 10

1.7 MOSI 11

BIT TRANSMISSIOIN IN PARALLEL


1.8 COMMUNICATION 12

BIT TRANSMISSIOIN IN SERIAL


1.9 COMMUNICATION 12

1.10 CLOCK SIGNAL 13


1.11 SLAVE SELECT ACTIVATION 13

1.12 MASTER TO SLAVE DATA TRANSFER 14

1.13 SLAVE TO MASTER DATA TRANSFER 14

3.1 SPI MODE PIN DIAGRAM 23

3.2 ONE-BIT SD MODE PIN DIAGRAM 23

3.3 FOUR-BIT SD MODE PIN DIAGRAM 24

3.4 FPGA BLOCK DIAGRAM 25

3.5 SD CARD INITIALIZATION FLOW CHART 27

WRITE DATA FLOW CHART FOR SD


3.6 CARD 29

3.7 READ DATA FLOW CHART FOR SD CARD 31

STRUCTURE OF SECTORS IN MEMORY


3.8 CARD 33
STRUCTURE OF CLUSTERS IN MEMORY
3.9 CARD 33

SCRAMBLED DATA STORAGE IN SD


3.10 CARD 34

3.11 FORMAT OF FAT32 34

PARTITION 512 BYTES – SECTOR 0 OF


3.12 SDCARD 36

PARTITION OF FIRST SECTION IN


3.13 MEMORY CORE 36

BIT VALUES OF BOOT SECTOR IN


3.14 MEMORY CORE 37

3.15 MASTER BOOT SECTOR/RECORD 38

3.16 ROOT DIRECTORY 39

STRUCTURE OF FS DIRECTORY IN SD
3.17 CARD 41

3.18 FAT32 ALGORITHM FOR READING 42

3.19 READ SCRAMBLER FILE IN FLASH 43


‘MEMORY CORE’

BLOCK DIAGRAM OF CODING LAYERS


3.20 IN FPGA 43
LIST OF SYMBOLS AND ABBREIVATIONS

LUT - Look Up Table

SD - Secure Digitals

CLK - Clock

CMD - Command

FIFO - First In First Out

SPI - Serial Peripheral Interface

I2C - Inter-Integrated Circuit


UART
- Universal Asynchronous Receiver-Transmitter

USB - Universal Serial Bus

WI-FI - Wireless Fidelity

DDR - Double Data Rate

VGA - Video Graphics Array

CPU - Central Processing Unit

PCB - Printed Circuit Board

OTP - One Time Programmable


1. INTRODUCTION

1.1 Introduction of Project

The revolution of computer in the past decades, have unfolded the use of computers, be it any
field. The Era of maintaining huge records for data storage has evolved. Computers have become
most used tool in almost each field. It has made the life of humans easier. Also, Computers have
made research very easier. Biomedical has offered modern medical devices for diagnostic and
preventive purposes, which include diagnostic test kits, vaccines, antibodies and radio- labeled
biological therapeutics used for imaging and investigation purpose. It has played a prominent
role in improving the challenges regarding to human health as it has flexibility to reduce global
health differences by the provision of promising technologies. Many types of cancers are being
detected and has become very common disease with the evolution of the technology. Skin cancer
is the most explored disease.

With increased use of cosmetics, pollution & radiations, cancer is becoming a common
disease in the modern era. The images of the affected area termed as ―lesion‖ are captured with
the help of derma scope and are fed as input to the algorithm. Several algorithms have been
proposed which requires input to be fed manually. The aim of this work is to propose an
algorithm which requires minimal intervention of doctors. In the recent years, due to the
increased use of cosmetics, and pollution & radiations, cancer is becoming a common disease in
the modern era.

Stages of skin cancer

As soon as the disease is discovered, next task would be determining in which stage the cancer
is. The stage in which the cancer is can be determined by various factors such as thickness, the
depth of penetration, and the extent to which the melanoma has spread. Based on the stage
determined, the patients are treated. The first stage of the skin cancer, that is the early stage of
melanoma (Stage 0 and Stage 1) are insular. Stage 0 tumors are in situ, which means they are
noninvasive and have not entered beneath the external layer of the skin (the epidermis).
Stage I tumors have attacked beneath the epidermis into the skin's next layer (the dermis) yet
are little and have no different characteristics, for example, ulceration that put them at high
danger of spreading (metastasizing) to close- by lymph hubs or beyond.

Stage II tumors, however limited, are bigger (for the most part 1 mm. thick or bigger) and
additionally may have different characteristics, for example, ulceration that put them at high
danger of spreading to the close- by lymph hubs or beyond. They are viewed as transitional or
"high-chance" melanomas. Further developed melanomas (Stages III and IV) have metastasized
to different parts of the body. There are additionally subdivisions inside stages.

1.2 Introduction of Domain

Deep Learning:

In the statistical context, Deep Learning is defined as an application of artificial intelligence


where available information is used through algorithms to process or assist the processing of
statistical data. While Deep Learning involves concepts of automation, it requires human
guidance. Deep Learning involves a high level of generalization in order to get a system that
performs well on yet unseen data instances.

Deep learning is a relatively new discipline within Computer Science that provides a collection
of data analysis techniques. Some of these techniques are based on well established statistical
methods (e.g. logistic regression and principal component analysis) while many others are not.

Most statistical techniques follow the paradigm of determining a particular probabilistic model
that best describes observed data among a class of related models. Similarly, most Deep learning
techniques are designed to find models that best fit data (i.e. they solve certain optimization
problems), except that these Deep learning models are no longer restricted to probabilistic ones.

Therefore, an advantage of Deep learning techniques over statistical ones is that the latter require
underlying probabilistic models while the former do not. Even though some Deep learning
techniques use probabilistic models, the classical statistical techniques are most often too
stringent for the oncoming Big Data era, because data sources are increasingly complex and
multi-faceted. Prescribing probabilistic models relating variables from disparate data sources that
are plausible and amenable to statistical analysis might be extremely difficult if not impossible.

Deep learning might be able to provide a broader class of more flexible alternative analysis
methods better suited to modern sources of data. It is imperative for statistical agencies to
explore the possible use of Deep learning techniques to determine whether their future needs
might be better met with such techniques than with traditional ones.

CLASSES OF DEEP LEARNING

There are two main classes of Deep learning techniques:

1. Supervised Deep learning and unsupervised Deep learning.

A. Examples of supervised learning Logistic regression (statistics) vs Support vector Deeps


(Deep learning) Logistic regression, when used for prediction purposes, is an example of
supervised Deep learning. In logistic regression, the values of a binary response variable (with
values 0 or 1, say) as well as a number of predictor variables (covariates) are observed for a
number of observation units. These are called training data in Deep learning terminology. The
main hypotheses are that the response variable follows a Bernoulli distribution (a class of
probabilistic models), and the link between the response and predictor variables is the relation
that the logarithm of the posterior odds of the response is a linear function of the predictors. The
response variables of the units are assumed to be independent of each other, and the method of
maximum likelihood is applied to their joint probability distribution to find the optimal values
for the coefficients (these parameterize the aforementioned joint distribution) in this linear
function. The particular model with these optimal coefficient values is called the “fitted model,”
and can be used to “predict” the value of the response variable for a new unit (or, “classify” the
new unit as 0 or 1) for which only the predictor values are known. Support Vector Deeps (SVM)
are an example of a non-statistical supervised Deep learning technique; it has the same goal as
the logistic regression classifier just described: Given training data, find the best-fitting SVM
model, and then use the fitted SVM model to classify new units. The difference is that the
underlying models for SVM are the collection of hyper planes in the space of the predictor
variables. The optimization problem that needs to be solved is finding the hyper plane that best
separates, in the predictor space, the units with response value 0 from those with response value
1. The logistic regression optimization problem comes from probability theory whereas that of
SVM comes from geometry.

Other supervised Deep learning techniques mentioned later in this briefing include decision
trees, neural networks, and Bayesian networks. B. Examples of unsupervised learning Principal
component analysis (statistics) vs Cluster analysis (Deep learning). The main example of an
unsupervised Deep learning technique that comes from classical statistics is principal component
analysis, which seeks to “summarize” a set of data points in high-dimensional space by finding
orthogonal one-dimensional subspaces along which most of the variation in the data points is
captured. The term “unsupervised” simply refers to the fact that there is no longer a response
variable in the current setting. Cluster analysis and association analysis are examples of non-
statistical unsupervised Deep learning techniques. The former seeks to determine inherent
grouping structure in given data, whereas the latter seeks to determine co-occurrence patterns of
items

1.2.1 Image Enhancement:

Image enhancement is one of the important stages for processing the image in digital image
processing field. Image enhancement is the process of making images more useful and it also
improves the quality of image. The reason why image enhancement is performed because it
highlights interesting details in the image removes noise from the image and makes the image
visually appealing. There are two broad categories of image enhancement techniques spatial
domain technique and frequency domain technique. Spatial domain techniques works directly on
the manipulation of image pixels whereas frequency domain is based on modifying the Fourier
or wavelet transform of image. If manipulation is done directly on image pixels and if the image
is noisy this means any unwanted information is added to the image then de-noising is performed
in two parts detection of noise and removal of that particular noise. Noise generally comes from
sensors, environmental conditions (rain, snow, lightening etc.) and transmission through noisy
channel. De-noising is performed because the image could be visually unpleasant, bad
compression or bad analysis. There are different noise types independent of spatial location and
spatially dependent. The noises which are independent of spatial location are impulsive noise and
AWGN (Additive white Gaussian noise)and the spatially dependent noise considers periodic
noise.

1.2.2 Digital Image Processing

Two principal research paths evolve under the name of Digital Image Processing. The first one
includes methods that attempt at answering question, was the image captured by the device it is
claimed to be acquired with? By performing some kind of ballistic analysis to identify the device
that captured the image or at least to determine which devices did not capture it.

The history of a digital image can be represented as a composition of several steps, collected into
three main phases: acquisition, coding, and editing. These methods will be collected in the
following under the common name of image source device identification techniques. The second
group of methods aims instead at exposing traces of semantic manipulation (i.e. forgeries) by
studying inconsistencies in natural image statistics.

Digital image processing allows one to enhance image features of interest while attenuating
detail irrelevant to a given application, and then extract useful information about the scene from
the enhanced image. This introduction is a practical guide to the challenges, and the hardware
and algorithms used to meet them. Images are produced by a variety of physical devices,
including still and video cameras, x-ray devices, electron microscopes, radar, and ultrasound, and
used for a variety of purposes, including entertainment, medical, business (e.g. documents),
industrial, military, civil (e.g. traffic), security, and scientific. The goal in each case is for an
observer, human or Deep, to extract useful information about the scene being imaged. An
example of an industrial application is Often the raw image is not directly suitable for this
purpose, and must be processed in some way. Such processing is called image enhancement;

1.2.3 Image Analysis

Image enhancement processing by an observer to extract information is called image analysis.


Enhancement and analysis are distinguished by their output, images Vs scene information, and
by the challenges faced and methods employed. Image enhancement has been done by chemical,
optical, and electronic means, while analysis has been done mostly by humans and electronically.
Digital image processing is a subset of the electronic domain wherein the image is converted to
an array of small integers called pixels, representing a physical quantity such as scene radiance
stored in a digital memory, and processed by computer or other digital hardware. Digital image
processing, either as enhancement for human observers or performing autonomous analysis,
offers advantages in cost, speed, and flexibility, and with the rapidly falling price and rising
performance of personal computers it has become the dominant method in use.

1.3 Objective of the Problem

Skin cancer is the most common non skin malignancy in humans and the second leading cause of
cancer mortality. Skin tumors and masses usually appear in the form of dense regions in tissue. A
typical benign mass has a round, smooth and well circumscribed boundary; on the other hand, a
malignant tumor usually has a speculated, rough, and blurry boundary. Computer aided detection
(CAD) systems in screening Skin serve as a second opinion for radiologists by identifying
regions with high suspicious of malignancy. The ultimate goal of CAD is to indicate such
locations with great accuracy and reliability. Thus far, most studies support the fact that CAD
technology has a positive impact on early Skin cancer detection. There is extensive literature on
the development and evaluation of CAD systems in MRI scan.

1.4 Scope of the project

Most of the proposed system follows a hierarchical approach. Initially the CAD system
prescreens a MRI Scan to detect suspicious regions in the Skin that serve as candidate location
for further analysis. In this the first stage is an algorithm of Median smoothing filter, top hat
operation for image enhancement in which the combined operations are applied to the original
gray tone image and the higher sensitive lesion site selection of the enhanced images are
observed. Then the second stage develops a thresholding method for segmenting tumor area. DL
classifier is a learning Deep used as a tool for data classification, function approximation, etc,
due to its generalization ability and has found success in many applications. Feature of DL is that
it minimizes and upper bound of generalization error through maximizing the margin between
separating hyper plane and dataset. DL has an extra advantage of automatic model selection in
the sense that both the optimal number and locations of the basic functions are automatically
obtained during training. The performance of DL largely depends on the Deep learning.
2. LITERATURE REVIEW

2.1 Detection skin cancer using SVM and snake model Prachya Bumrungkun ; Kosin

Chamnongthai ; Wisarn Patchoo IEEE 2022.

The reporting causes of death in Thailand. The cancer is most common cause of death in
Thailand, including colon cancer, skin cancer, skin cancer, cervical cancer, etc. The skin cancer
is one of cancers that increase every year. Considering and analyzing features of cancer image,
which includes Asymmetry, Border Irregularity, Compact Index, Fractal Dimension, Edge
Abruptness, Color variation and Diameter, is popular technique of analysis the patients with skin
cancer. To extract and analyze such features, image segmentation plays important role for
automatic skin cancer detection system. In this paper, we propose the image segmentation
scheme based on Support Vector Deep (SVM) and Snake active contour. SVM is used to help
finding the appropriate parameters for snake algorithm.

2.2 Millimeter-wave substrate integrated waveguide probe for near-field skin cancer

detection Giulia Mansutti ; Ahmed Toaha Mobashsher ; Amin M. Abbosh IEEE 2022.

Millimeter-wave near-field probes have recently attracted significant attention and are
regarded as a promising tool for skin cancer detection. In order to attain suitable performance,
these devices rely on conventional waveguides, that make the fabrication process complicated
and expensive. This work presents the design of a substrate integrated waveguide (SIW) probe
that overcomes the fabrication issues. The probe is excited by using a microstrip-to-SIW
transition and tapered at the end in order to increase the electric field intensity on the skin
surface. The operation of the probe depends on the shift in its resonance frequency based on the
dielectric properties of the skin. It is capable of detecting early stage tumours as small as 0.2 mm
in diameter and located in both thin and thick skin tissues.
2.3 A Method for Melanoma Skin Cancer Detection Using Dermoscopy Images Soniya

Mane ; Swati Shinde IEEE 2022.

Now days, Skin cancer is life threatening disease which causes human death. Abnormal
growth of melanocytic cells causes a skin cancer. Due to malignancy feature skin cancer is also
known as melanoma. Melanoma appears on the skin due to exposure of ultraviolet radiation and
genetic factors. So melanoma lesion appears as black or brown in colour. Early detection of
melanoma can cure completely. Biopsy is a traditional method for detecting skin cancer. This
method is painful and invasive. This method requires laboratory testing so it is time consuming.
Therefore, in order to solve the above stated issues computer aided diagnosis for skin cancer is
needed. Computer aided diagnosis uses Dermoscopy for capturing the skin image. In this paper
first pre-processing of the skin image is done. After pre-processing lesion part is segmented by
using image segmentation technique which is followed by feature extraction in which unique
features are extracted from segmented lesion. After feature extraction, classification by using
support vector Deep is performed for classifying the skin image as normal skin and melanoma
skin cancer. The proposed system results shows that support vector Deep with linear kernel gives
optimum accuracy.

2.4 Changes in epidermal dielectric properties due to skin cancer across the band 1 to 50

GHz B. J. Mohammed ; S. A. R. Naqvi ; M. Manoufali ; K. Bialkowski ; A. M. Abbosh


IEEE 2022.

An accurate non-invasive electromagnetic skin imaging system requires a precise dermal


tissue characterization. Studies related to microwave and millimeter-wave imaging techniques
indicate a significant difference in the dielectric properties between healthy and malignant
tissues. Malignant tissues tend to have higher water content compared to healthy tissues.
Therefore, the dielectric properties of cancerous tissues can be expressed as a function of healthy
tissue characteristics and their respective water content. In this work, a formula is derived to
calculate the dielectric properties of human skin melanoma (MM) and basal cell carcinoma
(BCC) tissues from the properties of healthy skin tissues. The derived formula indicates a
significant (20%) difference at 10 GHz between MM and healthy tissues, whereas the difference
is 11% for BCC. This substantial difference indicates the possibility of using electromagnetic
technique's for non-invasive skin cancer detection.

2.5 A Color-Based Approach for Melanoma Skin Cancer Detection Shalu ; Aman Kamboj
IEEE 2022.

Skin cancer cases are continuously arising from the past few years. Broadly skin cancer is
of three types: Basal Cell Carcinoma, Squamous Cell Carcinoma, and Melanoma. Among all its
types, melanoma is the dangerous form of skin cancer whose treatment is possible only if it is
detected in early stages. Early detection of melanoma is really challenging. Therefore, various
systems were developed to automate the process of melanoma skin cancer diagnosis. Features
used to characterize the disease play a very important role in the diagnosis. It is also very
important to find the correct combination of features and the Deep learning techniques for
classification. Here, a system for the melanoma skin cancer detection is developed by using a
MED-NODE dataset of digital images. Raw images from the dataset contain various artifacts so
firstly preprocessing is applied to remove these artifacts. Then to extract the region of interest
Active Contour segmentation method is used. Various color features were extracted from the
segmented part and the system performance is checked by using three classifiers (Naïve Bayes,
Decision Tree, and KNN). The system achieves an accuracy of 82.35% on Decision Tree which
is greater than other classifiers.

2.6 Potential Level Detection of Skin Cancer with Expert System Using Forward Chaining

and Certainty Factor Method Reinaldi Nur Pranata ; Andrew Brian Osmond ; Casi
Setianingsih IEEE 2022.

Skin cancer is the abnormal growth of skin cells that can not be controlled. Skin cancer
appears when the DNA is damaged skin cells (mostly due to ultraviolet radiation from the sun)
triggers mutations that skin cells grow rapidly, can not be controlled and start forming a tumor.
Skin cancer can be overcome if it is detected earlier before spreading or doing metastasis.
However, the tendency of people who are indifferent and reluctant to check or consult with
doctors make his condition worse without realizing it. Therefore, designed an application for
Skin Cancer Detection with Image Processing and Expert System using Forward Chaining and
Certainty Factor method. The end result of image processing and expert system in this
application is the assessment of High Risk, Low Risk, or Medium Risk of nevus conditions in
patients. With the design of this system is expected to help raise awareness to detect early skin
cancer. The results in this study show that the application has an accuracy rate of 100%. It shows
that this system produces the same results as an expert.

2.7 Geometric Analysis of Skin Lesion for Skin Cancer Using Image Processing Noel B.

Linsangan ; Jetron J. Adtoon ; Jumelyn L. Torres IEEE 2022.

This study focuses on the geometric features of skin lesions for detecting and classifying
skin cancer. Geometric features of the skin lesion are extracted following the asymmetry, border,
and diameter parameters of the ABCD-Rule of Dermoscopy. In particular, area, perimeter,
circularity index, greatest and shortest diameter, irregularity index and equivalent diameter are
the parameters loaded in the dataset for classification. Three classifications of skin lesion are
considered in this study such as malignant melanoma, benign melanoma, and unknown.
Classification of skin lesion images is done through k-Nearest Neighbors (k-NN) algorithm and
shows an accuracy of 90.0% in the functionality testing.

2.8 Cloud Infrastructure for Skin Cancer Scalable Detection System Pavels

Osipovs ; Dmitrijs Bliznuks ; Ilona Kuzmina IEEE 2022.

Skin cancer diagnostics is one of the medical areas where early diagnostic allows
achieving patients' high survival rate. Typically, skin cancer diagnostic is performed by
dermatologist, since the amount of such specialists is limited, mortality rate is high [1]. By
creating the low cost and easy to use diagnostic device, it is possible to bring skin cancer
diagnostic to primary care physicians and allow to check much more persons and diagnose skin
cancer on the early stages. There are several existing devices, that provide skin cancer
diagnostics [2]. Most of them process the skin images locally and have limited diagnostic
capabilities; some of them send images to dermatologists for manual analysis to achieve higher
diagnostic quality. Therefore, there is a lack of diagnostic quality or response time. To be able to
use the latest diagnostic algorithms and still have fast acting automated diagnostic system, we
propose using distributed cloud-based system. In that system, diagnostic device is used only for
image acquisition under special multispectral illumination (405nm, 535nm, 660nm and 950nm).
Obtained skin imaged are sent further to cloud system for analysis and diagnostic results
visualization. By means of proposed approach, images could be processed by using the same
Matlab [3] algorithms [4] that skin cancer research team is using. That will eliminate the need of
adopting each algorithm to a specific architecture of diagnostic device. Moreover, the proposed
system keeps relation between multiple skin analysis from each patient and could be used to
track skin lesions changes in time. Proposed cloud system has architecture that allows fast
scaling according to real-time requirements. Proposed system uses central load balancing server,
that accepts diagnostic requests and sends image processing request to less loaded Matlab
processing station. In case of high load, balancing server can launch an additional processing
station.

2.9 Automatic detection of translucency using a deep learning method from patches of

clinical basal cell carcinoma images He Huang ; Pegah Kharazmi ; David I.

McLean ; Harvey Lui ; Z. Jane Wang ; Tim K. Lee IEEE 2022.

Translucency, defined as a jelly-like appearance, is a common clinical feature of basal


cell carcinoma, the most common skin cancer. The feature plays an important role in diagnosing
basal cell carcinoma in an early stage because the feature can be observed readily in clinical
examinations with a high specificity of 93%. Therefore, translucency detection is a critical
component of computer aided systems which aim at early detection of basal cell carcinoma. To
address this problem, we proposed an automated method for analyzing patches of clinical basal
cell carcinoma images using stacked sparse autoencoder (SSAE). SSAE learns high-level
features in unsupervised manner and all learned features are fed into a softmax classifier for
translucency detection. Across the 4401 patches generated from 32 clinical images, the proposed
method achieved a 93% detection accuracy from a five-fold cross-validation. The preliminary
result suggested that the proposed method could detect translucency from skin images.

2.10 Image Analysis Model For Skin Disease Detection: Framework Alaa Haddad ; Shihab
A. Hameed IEEE 2022.
Skin disease is the most common disease in the world. The diagnosis of the skin disease
requires a high level of expertise and accuracy for dermatologist, so computer aided skin disease
diagnosis model is proposed to provide more objective and reliable solution. Many researches
were done to help detect skin diseases like skin cancer and tumor skin. But the accurate
recognition of the disease is extremely challenging due to the following reasons: low contrast
between lesions and skin, visual similarity between Disease and non-Disease area, etc. This
paper aims to detect skin disease from the skin image and to analyze this image by applying filter
to remove noise or unwanted things, convert the image to grey to help in the processing and get
the useful information. This help to give evidence for any type of skin disease and illustrate
emergency orientation. Analysis result of this study can support doctor to help in initial
diagnoses and to know the type of disease. That is compatible with skin and to avoid side effects.
3. PROBLEM STATEMENT AND METHODOLOGY

3.1 PROBLEM DEFINITION

The following are the problem faced in cancer detection

1. Less accuracy during classification.


2. Time consumption is high.
3. Cannot be implemented in all images.
4. Noise Ratio is very high.
5. Complication between tumor and cancer is high.

3.2 METHODOLOGY

.3.2.1 Existing System

AlexNet Architecture (AlexNet):

AlexNet is the name of a convolutional neural network (CNN) architecture, designed by Alex
Krizhevsky in collaboration with Ilya Sutskever and Geoffrey Hinton, who was Krizhevsky's
Ph.D. advisor.

AlexNet competed in the ImageNet Large Scale Visual Recognition Challenge on September 30,
2012. The network achieved a top-5 error of 15.3%, more than 10.8 percentage points lower than
that of the runner up. The original paper's primary result was that the depth of the model was
essential for its high performance, which was computationally expensive, but made feasible due
to the utilization of graphics processing units (GPUs) during training.

AlexNet is the name of a convolutional neural network (CNN), designed by Alex Krizhevsky in
collaboration with Ilya Sutskever and Geoffrey Hinton, who was Krizhevsky's Ph.D. advisor.

AlexNet competed in the ImageNet Large Scale Visual Recognition Challenge on September 30,
2012. The network achieved a top-5 error of 15.3%, more than 10.8 percentage points lower than
that of the runner up. The original paper's primary result was that the depth of the model was
essential for its high performance, which was computationally expensive, but made feasible due
to the utilization of graphics processing units (GPUs) during training.

AlexNet. The architecture consists of eight layers: five convolutional layers and three fully-
connected layers. But this isn’t what makes AlexNet special; these are some of the features used
that are new approaches to convolutional neural networks:

ReLU Nonlinearity:

AlexNet uses Rectified Linear Units (ReLU) instead of the tanh function, which was standard at
the time. ReLU’s advantage is in training time; a CNN using ReLU was able to reach a 25% error
on the CIFAR-10 dataset six times faster than a CNN using tanh.

Multiple GPUs.:

Back in the day, GPUs were still rolling around with 3 gigabytes of memory (nowadays those
kinds of memory would be rookie numbers). This was especially bad because the training set had
1.2 million images. AlexNet allows for multi-GPU training by putting half of the model’s neurons
on one GPU and the other half on another GPU. Not only does this mean that a bigger model can
be trained, but it also cuts down on the training time.

Overlapping Pooling:

CNNs traditionally “pool” outputs of neighboring groups of neurons with no overlapping.


However, when the authors introduced overlap, they saw a reduction in error by about 0.5% and
found that models with overlapping pooling generally find it harder to overfit.

LeNet Architecture (LeNet):

LeNet is a convolutional neural network structure proposed by Yann LeCun et al. in 1989. In
general, LeNet refers to lenet-5 and is a simple convolutional neural network. Convolutional
neural networks are a kind of feed-forward neural network whose artificial neurons can respond
to a part of the surrounding cells in the coverage range and perform well in large-scale image
processing. It is a representative of the early convolutional neural network, LeNet possesses the
basic units of convolutional neural network, such as convolutional layer, pooling layer and full
connection layer, laying a foundation for the future development of convolutional neural
network. lenet-5 consists of seven layers. In addition to input, every other layer can train
parameters. In the figure, Cx represents convolution layer, Sx represents sub-sampling layer, Fx
represents complete connection layer, and x represents layer index.[1]

Layer C1 is a convolution layer with six convolution kernels of 5x5 and the size of feature
mapping is 28x28, which can prevent the information of the input image from falling out of the
boundary of convolution kernel.

Layer S2 is the subsampling/pooling layer that outputs 6 feature graphs of size 14x14. Each cell
in each feature map is connected to 2x2 neighborhoods in the corresponding feature map in C1.

Layer C3 is a convolution layer with 16 5-5 convolution kernels. The input of the first six C3
feature maps is each continuous subset of the three feature maps in S2, the input of the next six
feature maps comes from the input of the four continuous subsets, and the input of the next three
feature maps comes from the four discontinuous subsets. Finally, the input for the last feature
graph comes from all feature graphs of S2.

Layer S4 is similar to S2, with size of 2x2 and output of 16 5x5 feature graphs.

Layer C5 is a convolution layer with 120 convolution kernels of size 5x5. Each cell is connected
to the 5*5 neighborhood on all 16 feature graphs of S4. Here, since the feature graph size of S4
is also 5x5, the output size of C5 is 1*1. So S4 and C5 are completely connected. C5 is labeled
as a convolutional layer instead of a fully connected layer, because if lenet-5 input becomes
larger and its structure remains unchanged, its output size will be greater than 1x1, i.e. not a fully
connected layer. F6 layer is fully connected to C5, and 84 feature graphs are output.

Vgg Net Architecture:

GG Net is the name of a pre-trained convolutional neural network (CNN) invented by Simonyan
and Zisserman from Visual Geometry Group (VGG) at University of Oxford in 2014 and it was
able to be the 1st runner-up of the ILSVRC (ImageNet Large Scale Visual Recognition
Competition) 2014 in the classification task. VGG Net has been trained on ImageNet ILSVRC
data set which includes images of 1000 classes split into three sets of 1.3 million training images,
100,000 testing images and 50,000 validation images. The model obtained 92.7% test accuracy
in ImageNet. VGG Net has been successful in many real world applications such as estimating
the heart rate based on the body motion, and pavement distress detection.

VGG Net has learned to extract the features (feature extractor) that can distinguish the objects
and is used to classify unseen objects.VGG was invented with the purpose of enhancing
classification accuracy by increasing the depth of the CNNs. VGG 16 and VGG 19, having 16
and 19 weight layers, respectively, have been used for object recognition. VGG Net takes input
of 224×224 RGB images and passes them through a stack of convolutional layers with the fixed
filter size of 3×3 and the stride of 1. There are five max pooling filters embedded between
convolutional layers in order to down-sample the input representation (image, hidden-layer
output matrix, etc.). The stack of convolutional layers is followed by 3 fully connected layers,
having 4096, 4096 and 1000 channels, respectively. The last layer is a soft-max layer. Below
figure shows VGG network structure.

Although VGG Net have been effective for object recognition, it does not work properly for
scenes recognition. Places205-VGGNet is an updated version of VGG Net. Places205-VGGNet
that has been trained on MIT67, SUN397, and Places205 data set, can recognize scene images.
Places205-VGGNet utilizes corner cropping strategy and multi-scale cropping method.

3.2.2 Proposed System

ResNet Architecture:

A residual neural network (ResNet) is an artificial neural network (ANN) of a kind that builds
on constructs known from pyramidal cells in the cerebral cortex. Residual neural networks do
this by utilizing skip connections, or shortcuts to jump over some layers. Typical ResNet models
are implemented with double- or triple- layer skips that contain nonlinearities (ReLU) and batch
normalization in between. An additional weight matrix may be used to learn the skip weights;
these models are known as HighwayNets. Models with several parallel skips are referred to
as DenseNets. In the context of residual neural networks, a non-residual network may be
described as a plain network.
There are two main reasons to add skip connections: to avoid the problem of vanishing gradients,
or to mitigate the Degradation (accuracy saturation) problem; where adding more layers to a
suitably deep model leads to higher training error. During training, the weights adapt to mute the
upstream layer, and amplify the previously-skipped layer. In the simplest case, only the weights
for the adjacent layer's connection are adapted, with no explicit weights for the upstream layer.
This works best when a single nonlinear layer is stepped over, or when the intermediate layers
are all linear. If not, then an explicit weight matrix should be learned for the skipped connection.

Skipping effectively simplifies the network, using fewer layers in the initial training stages. This
speeds learning by reducing the impact of vanishing gradients, as there are fewer layers to
propagate through. The network then gradually restores the skipped layers as it learns the feature
space. Towards the end of training, when all layers are expanded, it stays closer to the manifold
and thus learns faster. A neural network without residual parts explores more of the feature
space. This makes it more vulnerable to perturbations that cause it to leave the manifold, and
necessitates extra training data to recover.

3.3 SYSTEM ARCHITECTURE


3.4 UML DIAGRAMS

3.4.1 Use case Diagram


3.4.2 Class Diagram

3.4.3 Deployment Diagram


3.4.4 Component Diagram
4. SYSTEM IMPLEMENTATION

4.1 MODULE DESCRIPTION


There are 5 components in the system. They are

(i) Image Acquisition


(ii) Image Preprocessing
(iii) Image Segmentation
(iv) Feature Extraction
(v) Classification.

In Image Acquisition, real-time Skin MRI images are collected. The collected images are
cropped to a specific size. Then noise present inside the Image is been removed. Segmentation is
the third component. It consists of segmenting the converted grayscale images using Median and
Gaussian filtering. This helps to get rid of problems like backgrounds, illumination of light, etc.
Feature Extraction is extracting or showing the portion of the segmented images so that
classification becomes easy. The last module includes the classification in which Tensor Flow
and ML architecture is used.

1. Image Acquisition Image

Acquisition is the process of collection of images. These images are downloaded from the online
dataset provider called Kaggle.com.

2. Image Preprocessing

Image preprocessing includes converting normal images into resize images. Grayscale images
have the combination of black and white. Grayscale images help to reduce noise and also make
the background neutral. It also helps to improve brightness of the image. Data augmentation is a
way of creating new data which has benefits like the ability to generate more data from limited
data and it prevents over fitting.
3. Image Segmentation

Image segmentation breaks the image down into meaningful regions. It divides digital image into
multiple segments. The goal is to simplify or change the representation into more meaningful
image. It differentiates between the objects we want to inspect further and the other objects or
their background. It consists of segmenting the converted grayscale images using K means
segmentation.

4. Feature Extraction

Feature extraction is extracting or showing of the segmented portion of the image so that
classification becomes easy. Features are extracted in order to differentiate between the images.
Features extraction is used in almost all Deep vision algorithms. The common goal of feature
extraction and representation techniques is to convert the segmented objects into representations
that better describe their main features and attributes.

5. Classification

Here we use the concept of Classifiers and its architecture for classification method. The last
module includes the classification in which Tensor Flow and Deep Learning algorithm will be
used. Tensor Flow is a matlab-friendly open source library for numerical computation that makes
Deep learning faster and easier. Tensor Flow allows developers to create dataflow graphs -
structures that describe how data moves through a graph, or a series of processing nodes. Each
node in the graph represents a mathematical operation, and each connection or edge between
nodes is a multidimensional data array, or tensor.

4.2 ALGORITHM OF PROPOSED WORK

Step1: Pre-process the images of skin to remove background noise

Step2: Convert the pre processed image to binary image using threshold algorithm.

Step3: Region label the binary image.


Step4: Segment the individual skin noodle present in the image.

Step5: Extract the geometric features major axis, minor axis and area of all the skin.

Step6: Perform analysis on the quality using the average values of the features extracted

Step7: Classify the sample for the Type and grade based on the analysis

Stop.

4.3 FLOWCHART

4.4 COMPARATIVE STUDY OF EXISTING AND PROPOSED SYSTEM

This project presents recent advancements of using computer- vision based systems for
classification of liver varieties. A computer-vision application using image processing techniques
involves five basic processes such as image acquisition, pre- processing, segmentation, object
detection, and classification. This survey highlights these approaches in the context of liver
grading practices and summarizes their relevancy. In our project we will be using the following
algorithms such as LeNet, ResNet, AlexNet and VGG 16 and its accuracy is been calculated and
well compared to other algorithms. From the results its proved that ResNet works better than
other algorithms interms of accuracy.
5. SYSTEM STUDY

5.1 FEASIBILTY STUDY

The feasibility of the project is analyzed in this phase and business proposal is put forth
with a very general plan for the project and some cost estimates. During system analysis the
feasibility study of the proposed system is to be carried out. This is to ensure that the proposed
system is not a burden to the company. For feasibility analysis, some understanding of the major
requirements for the system is essential.

The feasibility study investigates the problem and the information needs of the
stakeholders. It seeks to determine the resources required to provide an information systems
solution, the cost and benefits of such a solution, and the feasibility of such a solution. The
analyst conducting the study gathers information using a variety of methods, the most popular of
which are:

 Developing and administering questionnaires to interested stakeholders, such as potential


users of the information system.
 Observing or monitoring users of the current system to determine their needs as well as
their satisfaction and dissatisfaction with the current system.
 Collecting, examining, and analyzing documents, reports, layouts, procedures, manuals,
and any other documentation relating to the operations of the current system.
 Modeling, observing, and simulating the work activities of the current system.

The goal of the feasibility study is to consider alternative information systems solutions, evaluate
their feasibility, and propose the alternative most suitable to the organization. The feasibility of a
proposed solution is evaluated in terms of its components. These components are:

 ECONOMICAL FEASIBILITY
 TECHNICAL FEASIBILITY
 SOCIAL FEASIBILITY
 OPERATIONAL FEASIBILITY

5.2 ECONOMICAL FEASIBILITY

This study is carried out to check the economic impact that the system will have on the
organization. The amount of fund that the company can pour into the research and development
of the system is limited. The expenditures must be justified. Thus the developed system as well
within the budget and this was achieved because most of the technologies used are freely
available. Only the customized products had to be purchased.

5.3 TECHNICAL FEASIBILITY

This study is carried out to check the technical feasibility, that is, the technical requirements of
the system. Any system developed must not have a high demand on the available technical
resources. This will lead to high demands on the available technical resources. This will lead to
high demands being placed on the client. The developed system must have a modest
requirement, as only minimal or null changes are required for implementing this system.

5.4 SOCIAL FEASIBILITY

The aspect of study is to check the level of acceptance of the system by the user. This
includes the process of training the user to use the system efficiently. The user must not feel
threatened by the system, instead must accept it as a necessity.

The level of acceptance by the users solely depends on the methods that are employed to
educate the user about the system and to make him familiar with it. His level of confidence must
be raised so that he is also able to make some constructive criticism, which is welcomed, as he is
the final user of the system.
5.5 OPERATIONAL FEASIBILITY

The ability, desire, and willingness of the stakeholders to use, support, and operate the
proposed computer information system. The stakeholders include management, employees,
customers, and suppliers. The stakeholders are interested in systems that are easy to operate,
make few, if any, errors, produce the desired information, and fall within the objectives of the
organization.
6. SYSTEM TESTING

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

TYPES OF TESTS

6.1 Unit testing

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

6.2 Integration testing

Integration tests are designed to test integrated software components to determine if they
actually run as one program. Testing is event driven and is more concerned with the basic
outcome of screens or fields. Integration tests demonstrate that although the components were
individually satisfaction, as shown by successfully unit testing, the combination of components is
correct and consistent. Integration testing is specifically aimed at exposing the problems that
arise from the combination of components

6.3 Functional test

Functional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical requirements, system documentation, and user manuals.

Functional testing is centered on the following items:

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

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

Functions : identified functions must be exercised.

Output : identified classes of application outputs must be exercised.

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

Organization and preparation of functional tests is focused on requirements, key functions, or


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

6.4 System Test

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

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

6.6 Black Box Testing

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

6.7 Unit Testing:

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

Test strategy and approach


Field testing will be performed manually and functional tests will be written in detail.

Test objectives

 All field entries must work properly.


 Pages must be activated from the identified link.
 The entry screen, messages and responses must not be delayed.
Features to be tested

 Verify that the entries are of the correct format


 No duplicate entries should be allowed
 All links should take the user to the correct page.

6.8 Integration Testing

Software integration testing is the incremental integration testing of two or more


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

Test Results: All the test cases mentioned above passed successfully. No defects encountered.

6.9 Acceptance Testing

User Acceptance Testing is a critical phase of any project and requires significant
participation by the end user. It also ensures that the system meets the functional requirements.

Test Results: All the test cases mentioned above passed successfully. No defects encountered.
7. MATLAB SOFTWARE

SOFTWARE DESCRIPTION

7.1 Introduction

If you are new to MATLAB, you should start by reading Manipulating Matrices. The most
important things to learn are how to enter matrices, how to use the: (colon) operator, and how to
invoke functions. After you master the basics, you should read the rest of the sections below and
run the demos.

At the heart of MATLAB is a new language you must learn before you can fully exploit its
power. You can learn the basics of MATLAB quickly, and mastery comes shortly after. You will
be rewarded with high productivity, high-creativity computing power that will change the way
you work.

7.2 Describes the components of the MATLAB system.

Development Environment - introduces the MATLAB development environment, including


information about tools and the MATLAB desktop.

Manipulating Matrices - introduces how to use MATLAB to generate Matrices and perform
mathematical operations on matrices.

Graphics - introduces MATLAB graphic capabilities, including information about plotting data,
annotating graphs, and working with images.

Programming with MATLAB - describes how to use the MATLAB language to create scripts
and functions, and manipulate data structures, such as cell arrays and multidimensional arrays.

MATLAB is a high-performance language for technical computing. It integrates computation,


visualization, and programming in an easy-to-use environment where problems and solutions are
expressed in familiar mathematical notation.
7.3 Typical uses include

i. Math and computation

ii. Algorithm development

iii. Modeling, simulation, and prototyping

iv. Data analysis, exploration, and visualization

v. Scientific and engineering graphics

vi. Application development, including graphical user interface building

MATLAB is an interactive system whose basic data element is an array that does not require
dimensioning. This allows you to solve many technical computing problems, especially those
with matrix and vector formulations, in a fraction of the time it would take to write a program in
a scalar noninteractive language such as C or FORTRAN.

The name MATLAB stands for matrix laboratory. MATLAB was originally written to provide
easy access to matrix software developed by the LINPACK and EISPACK projects.

MATLAB has evolved over a period of years with input from many users. In university
environments, it is the standard instructional tool for introductory and advanced courses in
mathematics, engineering, and science. In industry, MATLAB is the tool of choice for high-
productivity research, development, and analysis.

Toolboxes are comprehensive collections of MATLAB functions (M-files) that extend the
MATLAB environment to solve particular classes of problems. Areas in which toolboxes are
available include signal processing, control systems, neural networks, fuzzy logic, wavelets,
simulation, and many others.

7.4 Matlab system

The MATLAB system consists of five main parts:

Development Environment

This is the set of tools and facilities that help you use MATLAB functions and files. Many of
these tools are graphical user interfaces. It includes the MATLAB desktop and Command
Window, a command history, and browsers for viewing help, the workspace, files, and the search
path.

The Matlab Mathematical Function Library

This is a vast collection of computational algorithms ranging from elementary functions like
sum, sine, cosine, and complex arithmetic, to more sophisticated functions like matrix inverse,
matrix eigenvalues, Bessel functions, and fast Fourier transforms.

The Matlab Language

This is a high-level matrix/array language with control flow statements, functions, data
structures, input/output, and object-oriented programming features. It allows both "programming
in the small" to rapidly create quick and dirty throw-away programs, and "programming in the
large" to create complete large and complex application programs.

Handle Graphics

This is the MATLAB graphics system. It includes high-level commands for two-dimensional and
three-dimensional data visualization, image processing, animation, and presentation graphics. It
also includes low-level commands that allow you to fully customize the appearance of graphics
as well as to build complete graphical user interfaces on your MATLAB applications.

The Matlab Application Program Interface (Api)

This is a library that allows you to write C and FORTRAN programs that interact with
MATLAB. It include facilities for calling routines from MATLAB (dynamic linking), calling
MATLAB as a computational engine, and for reading and writing MAT-files.

Development environment

This chapter provides a brief introduction to starting and quitting MATLAB, and the tools and
functions that help you to work with MATLAB variables and files. For more information about
the topics covered here, see the corresponding topics under Development Environment in the
MATLAB documentation, which is available online as well as in print.
7.5 Starting and Quitting MATLAB

Starting Matlab

On a Microsoft Windows platform, to start MATLAB, double-click the MATLAB shortcut icon
on your Windows desktop.

On a UNIX platform, to start MATLAB, type matlab at the operating system prompt.

After starting MATLAB, the MATLAB desktop opens - see MATLAB Desktop.You can change
the directory in which MATLAB starts, define startup options including running a script upon
startup, and reduce startup time in some situations.

Quitting Matlab

To end your MATLAB session, select Exit MATLAB from the File menu in the desktop, or type
quit in the Command Window. To execute specified functions each time MATLAB quits, such
as saving the workspace, you can create and run a finish.m script.

Matlab Desktop

When you start MATLAB, the MATLAB desktop appears, containing tools (graphical user
interfaces) for managing files, variables, and applications associated with MATLAB.

7.6 Image Processing with MATLAB

The purpose of this tutorial is to gain familiarity with MATLAB’s Image Processing Toolbox.
This tutorial does not contain all of the functions available in MATLAB. It is very useful to go to
Help\MATLAB Help in the MATLAB window if you have any questions not answered by this
tutorial. Many of the examples in this tutorial are modified versions of MATLAB’s help
examples. The help tool is especially useful in image processing applications, since there are
numerous filter examples.

1. Opening MATLAB in the microcomputer lab


Access the Start Menu, Proceed to Programs, Select MATLAB 14 from the MATLAB 14 folder
--OR-- Open through C:\MATLAB6p5\bin\win32\matlab.exe

2. MATLAB

When MATLAB opens, the screen should look something like what is pictured in Figure 7.1
below.

Fig 7.1: Example of M- Work space

The Command Window is the window on the right hand side of the screen. This window is used
to both enter commands for MATLAB to execute, and to view the results of these commands.
The Command History window, in the lower left side of the screen, displays the commands that
have been recently entered into the Command Window. In the upper left hand side of the screen
there is a window that can contain three different windows with tabs to select between them. The
first window is the Current Directory, which tells the user which M-files are currently in use. The
second window is the Workspace window, which displays which variables are currently being
used and how big they are. The third window is the Launch Pad window, which is especially
important since it contains easy access to the available toolboxes, of which, Image Processing is
one. If these three windows do not all appear as tabs below the window space, simply go to View
and select the ones you want to appear. In order to gain some familiarity with the Command
Window, try Example 2.1, below. You must type code after the >> prompt and press return to
receive a new prompt. If you write code that you do not want to reappear in the MATLAB
Command Window, you must place a semi colon after the line of code. If there is no semi colon,
then the code will print in the command window just under where you typed it.

Example 2.1

X = 1; %press enter to go to next line

Y = 1; %press enter to go to next line

Z = X + Y %press enter to receive result

As you probably noticed, MATLAB gave an answer of Z = 2 under the last line of typed code. If
there had been a semi colon after the last statement, the answer would not have been printed.
Also, notice how the variables you used are listed in the Workspace Window and the commands
you entered are listed in the Command History window. If you want to retype a command, an
easy way to do this is to press the ↑ or ↓ arrows until you reach the command you want to
reenter.

3. The M-file

M-file – An M-file is a MATLAB document the user creates to store the code they write for their
specific application. Creating an M-file is highly recommended, although not entirely necessary.
An M-file is useful because it saves the code the user has written for their application. It can be
manipulated and tested until it meets the user’s specifications. The advantage of using an Mfile is
that the user, after modifying their code, must only tell MATLAB to run the M-file, rather than
reenter each line of code individually. 3.2. Creating an M-file – To create an M-file, select File\
New ►M-file.

Saving – The next step is to save the newly created M-file. In the M-file window, select File\
Save As… Choose a location that suits your needs, such as a disk, the hard drive or the U drive.
It is not recommended that you work from your disk or from the U drive, so before editing and
testing your M-file you may want to move your file to the hard drive. Opening an M-file – To
open up a previously designed M-file, simply open MATLAB in the same manner as described
before. Then, open the M-file by going to File\Open…, and selecting your file. Then, in order for
MATLAB to recognize where your M-file is stored, you must go to File\Set Path… This will
open up a window that will enable you to tell MATLAB where your M-file is stored. Click the
Add Folder… button, then browse to find the folder that your M-file is located in, and press OK.
Then in the Set Path window, select Save, and then Close. If you do not set the path, MATLAB
may open a window saying your file is not in the current directory. In order to get by this, select
the “Add directory to the top of the MATLAB path” button, and hit OK. This is essentially the
same as setting the path, as described above. Writing Code – After creating and saving your M-
file, the next step is to begin writing code. A suggested first move is to begin by writing
comments at the top of the M-file with a description of what the code is for, who designed it,
when it was created, and when it was last modified. Comments are declared by placing a %
symbol before them. Comments appear in green in the M-file window. Resaving – After writing
code, you must save your work before you can run it. Save your code by going to File\Save.
Running Code – To run code, simply go to the main MATLAB window and type the name of
your M-file after the >> prompt. Other ways to run the M-file are to press F5 while the M-file
window is open, select Debug\Run, or press the Run button in the M-file window toolbar.

Fig 7.2: Example of M-file

7.7 Images
Images – The first step in MATLAB image processing is to understand that a digital image is
composed of a two or three dimensional matrix of pixels. Individual pixels contain a number or
numbers representing what grayscale or color value is assigned to it. Color pictures generally
contain three times as much data as grayscale pictures, depending on what color representation
scheme is used. Therefore, color pictures take three times as much computational power to
process. In this tutorial the method for conversion from color to grayscale will be demonstrated
and all processing will be done on grayscale images. However, in order to understand how image
processing works, we will begin by analyzing simple two dimensional 8-bit matrices. Loading an
Image – Many times you will want to process a specific image, other times you may just want to
test a filter on an arbitrary matrix. If you choose to do this in MATLAB you will need to load the
image so you can begin processing. If the image that you have is in color, but color is not
important for the current application, then you can change the image to grayscale. This makes
processing much simpler since then there are only a third of the pixel values present in the new
image. Color may not be important in an image when you are trying to locate a specific object
that has good contrast with its surroundings. Example 4.1, below, demonstrates how to load
different images.

In some instances, the image in question is a matrix of pixel values. For example, you may need
something to test a filter on, but you do not yet need a real image to test the filter. Therefore, you
can simply create a matrix that has the characteristics wanted, such as areas of high and low
frequency. See Example 6.1, for a demonstration of this. Other times a stored image must be
imported into MATLAB to be processed. If color is not an important aspect then rgb2gray can be
used to change a color image into a grayscale image.

C:\MATLAB6p5\toolbox\images\imdemos. Therefore, it is a good idea to know how to load


any image from any folder.
Figure 7.3: M-file for Loading Images

The class of the new image is the same as that of the color image. As you can see from the
example M-file in Figure, MATLAB has the capability of loading many different image formats,
two of which are shown. The function imread is used to read an image file with a specified
format. Consult imread in MATLAB’s help to find which formats are supported. The function
imshow displays an image, while figure tells MATLAB which figure window the image should
appear in. If figure does not have a number associated with it, then figures will appear
chronologically as they appear in the M-file. The images used in this example are both
MATLAB example images. In order to demonstrate how to load an image file, these images
were copied and pasted into the folder denoted in the M-file.
Writing an Image – Sometimes an image must be saved so that it can be transferred to a disk or
opened with another program. In this case you will want to do the opposite of loading an image,
reading it, and instead write it to a file. This can be accomplished in MATLAB using the imwrite
function. This function allows you to save an image as any type of file supported by MATLAB,
which are the same as supported by imread.

In order to save an image you must use the imwrite function in MATLAB. The M-file in Figure
contains code for saving an image. This M-file loads the same bitmap file as described in the M-
file pictured. However, this new M-file saves the grayscale image created as a JPEG image.
Fig 7.4: M-file for Saving an Image

7.8 Image Properties

Histogram – A histogram is bar graph that shows a distribution of data. In image processing
histograms are used to show how many of each pixel value are present in an image. Histograms
can be very useful in determining which pixel values are important in an image. From this data
you can manipulate an image to meet your specifications. Data from a histogram can aid you in
contrast enhancement and thresholding. In order to create a histogram from an image, use the
imhist function. Contrast enhancement can be performed by the histeq function, while
thresholding can be performed by using the graythresh function and the im2bw function. See
Example 5.1, for a demonstration of imhist, imadjust, graythresh, and im2bw. If you want to see
the resulting histogram of a contrast enhanced image, simply perform the imhist operation on the
image created with histeq. Negative – The negative of an image means the output image is the
reversal of the input image. In the case of an 8-bit image, the pixels with a value of 0 take on a
new value of 255, while the pixels with a value of 255 take on a new value of 0. All the pixel
values in between take on similarly reversed new values. The new image appears as the opposite
of the original. The imadjust function performs this operation.
7.9 Frequency Domain

Fourier Transform – In order to understand how different image processing filters work, it is a
good idea to begin by understanding what frequency has to do with images. An image is in
essence a two dimensional collection of discrete signals. Therefore, the signals have frequencies
associated with them. For instance, if there is relatively little change in grayscale values as you
scan across an image, then there is lower frequency content contained within the image. If there
is wide variation in grayscale values across an image then there will be more frequency content
associated with the image. This may seem somewhat confusing, so let us think about this in
terms that are more familiar to us. From signal processing, we know that any signal can be
represented by a collection of sine waves of differing frequencies, magnitudes and phases. This
transformation of a signal into its constituent sinusoids is known as the Fourier Transform. This
collection of sine waves can potentially be infinite, if the signal is difficult to represent, but is
generally truncated at a point where adding more signals does not significantly improve the
resolution of the recreation of the original signal. In digital systems, we use a Fourier Transform
designed in such a way that we can enter discrete input values, specify our sampling rate, and
have the computer generate discrete outputs. This is known as the Discrete Fourier Transform, or
DFT. MATLAB uses a fast algorithm for performing a DFT, which is called the Fast Fourier
Transform, or FFT, whose MATLAB command is fft. The FFT can be performed in two
dimensions, fft2 in MATLAB. This is very useful in image processing because we can then
determine the frequency content of an image. Still confused? Picture an image as a two
dimensional matrix of signals. If you plotted just one row, so that it showed the grayscale value
stored within each pixel, you might end up with something that looks like a bar graph, with
varying values in each pixel location. Each pixel value in this signal may appear to have no
correlation to the next one. However, the Fourier Transform can determine which frequencies are
present in the signal. In order to see the frequency content, it is useful to view the absolute value
of the magnitude of the Fourier Transform, since the output of a Fourier Transform is complex in
nature.
7.10 Filters

Filters – Image processing is based on filtering the content of images. Filtering is used to modify
an image in some way. This could entail blurring, deblurring, locating certain features within an
image, etc… Linear filtering is accomplished using convolution, as discussed above. A filter, or
convolution kernel as it is also known, is basically an algorithm for modifying a pixel value,
given the original value of the pixel and the values of the pixels surrounding it. There are literally
hundreds of types of filters that are used in image processing. However, we will concentrate on
several common ones. Low Pass Filters – The first filters we will talk about are low pass filters.
These filters blur high frequency areas of images. This can sometimes be useful when attempting
to remove unwanted noise from an image. However, these filters do not discriminate between
noise and edges, so they tend to smooth out content that should not be smoothed out.

Filters – Filters can be very useful for removing noise from images. A median filter is like an
averaging filter in some ways. The averaging filter examines the pixel in question and its
neighbor’s pixel values and returns the mean of these pixel values. The median filter looks at this
same neighborhood of pixels, but returns the median value. In this way noise can be removed,
but edges are not blurred as much, since the median filter is better at ignoring large discrepancies
in pixel values.

Erosion and Dilation – Erosion and Dilation are similar operations to median filtering in that
they both are neighborhood operations. The erosion operation examines the value of a pixel and
its neighbors and sets the output value equal to the minimum of the input pixel values. Dilation,
on the other hand, examines the same pixels and outputs the maximum of these pixels. In
MATLAB erosion and dilation can be accomplished by the imerode and imdilate functions,
respectively, accompanied by the strel function.

Edge Detectors – Edge detectors are very useful for locating objects within images. There are
many different kinds of edge detectors, but we will concentrate on two: the Sobel edge detector
and the Canny edge detector. The Sobel edge detector is able to look for strong edges in the
horizontal direction, vertical direction, or both directions. The Canny edge detector detects all
strong edges plus it will find weak edges that are associated with strong edges. Both of these
edge detectors return binary images with the edges shown in white on a black background.

Segmentation – Segmentation is the process of fractioning an image into its component objects.
This can be accomplished in various ways in MATLAB. One way is to use a combination of
morphological operations to segment touching objects within an image. Another method is to
use a combination of dilation and erosion to segment objects. The MATLAB function bwperim
performs this operation on binary images.
8. CONCLUSION AND FUTURE SCOPE

8.1 Conclusion

This project demonstrates the modeling of skin cancer as classification task and describes the
implementation of DL approach for classifying skin cancer as either benign or malignant. The
results of DL were compared on the basis of accuracy with existing system. It was observed that
classification implemented by DL technique in this project is more efficient compare to existing
algorithms as seen in the accuracy and precision. Based on the results, ML technique is more
efficient compared to other existing methods technique in liver cancer detection.

8.2 Future Scope

In future we can focus on determining the stage of the skin cancer, based on various feature such
as the area of the spread, diameter, color of the lesion, etc. The analysis can be made with the
help of Deep learning algorithm, in with we train the system based on the history of the images
stored in the database, and test the current image to determine, whether the test image comes in
the category of the melanoma or not, if it does, then to determine its stage. A comparison can be
made with the existing systems, Deep learning reduces the computational time. Hence, the
treatment can begin faster
9. REFERENCES

[1] Detection skin cancer using SVM and snake model. Bumrungkun, P., Chamnongthai, K., &
Patchoo, W. 2018 International Workshop on Advanced Image Technology

[2] A SVM based diagnosis of melanoma using only useful image features, Suleiman Mustafa;
Akio Kimura , International Workshop on Advanced Image Technology (IWAIT) Year-2018

[3] Deep Convolution Pixel-wise Labeling for skin lesion Image Segmentation ,Ali
Youssef ;Domenico D. Bloisi ;Mario Muscio ; Andrea Pennisi ; Daniele Nardi ; Antonio
Facchiano IEEE International Symposium on Medical Measurements and Applications
(MeMeA) Year: 2018

[4] Early Detection of Melanoma Skin Cancer Using Classifiers, VS. Sabeera, P. Vamsi Krishna
PG Scholar, Dept. of ECE, R. K. College of Engineering, Vijayawada, Andhra Pradesh Assistant
Professor, Dept. of ECE, R.K. College of Engineering, Vijayawada, Andhra Pradesh, Year-2016

[5] Skin Cancer Detection and classification Pratik Dubal, Sankirtan Bhatt, Chaitanya Joglekar,
Dr. Sonali Patil, Department of Information Technology K. J. Somaiya College of Engineering
Vidyavihar, Year-2017

[6] Skin Cancer Detection using Artificial Neural Network, Ekta Singhal M.Tech II Year, Dept
of Computer Science Engineering, MUST – FET, Lakshmangarh, India Shamik Tiwari,
Assistant Professor, Dept of Computer Science Engineering, MUST – FET, Lakshmangarh,
India, Year-2015

[7] Detection of Skin Cancer Using Image Processing Techniques, Chandrahasa M, Varun
Vadigeri and Dixit Salecha, Computer Science and Engineering, The National Institute of
Engineering, Year-2016

[8] Image Processing for Skin Cancer Features Extraction Md.Amran Hossen Bhuiyan, Ibrahim
Azad, Md.Kamal Uddin, Department of Computer Science & Telecommunication Engineering,
Noakhali Science & Technology University, Bangladesh, International Journal of Scientific &
Engineering Research Volume 4, Issue 2, February-2018.

[9] Alaa Haddad, Shihab A. Hameed et. al "Image Analysis Model For Skin Disease. 2018
Advances in Wireless and Optical Communications.

[10] Amir Mirbeik-Sabzevari "Ultra-Wideband, Stable Normal and Cancer Skin Tissue
Phantoms for Millimeter-Wave Skin Cancer Imaging". IEEE publication.

[11] Azadeh Noori Hoshyar, Adel Al- Jumaily, Riza Sulaiman "Review On Automatic Early
Skin Cancer Detection". IEEE publication

[12] Enakshi Jana, Dr.Ravi Subban "Research on Skin Cancer Cell Detection using Image
Processing". IEEE publication.

[13] Haseeb Younis et. al "Classification of Skin Cancer Dermoscopy Images using Transfer
Learning". 2018 7th International Conference on Computer and Communication Engineering
(ICCCE).

[14] Kyamelia Roy et. al "Skin Disease detection based on different Segmentation Techniques".
IEEE Publication.

[15] Ms. Amulya P M, Prof Mr. Jayakumar T V "A Study on Melanoma Skin Cancer Detection
Techniques". International Conference on Intelligent Sustainable Systems (ICISS 2017) IEEE
Xplore Compliant - Part Number: CFP17M19-ART, ISBN:978-1-5386-1959-9.

[16] Naser Alfed, Fouad Khelifi and Ahmed Bouridane "Improving a Bag of Words Approach
for Skin Cancer Detection in Dermoscopic Images". CoDIT’16 - April 6-8, 2016, Malta.

[17] Pavels Osipovs, Dmitrijs Bliznuks, "Cloud Infrastructure for Skin Cancer Scalable
Detection System". IEEE publication.

You might also like