0% found this document useful (0 votes)
856 views

Skin Cancer Full Document

Learn about skin cancer identification whether it is malignant or benign. It is done using MATLAB software

Uploaded by

Ghana Kiran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
856 views

Skin Cancer Full Document

Learn about skin cancer identification whether it is malignant or benign. It is done using MATLAB software

Uploaded by

Ghana Kiran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 53

SKIN CANCER DETECTION USING CNN

ABSTRACT:
Cancer, a dreadful disease characterized by uncontrolled growth and spread of
abnormal cells cause death worldwide. The skin is a vital organ forming a protective
barrier against the environment. But because it is located on the outer part, the skin is
prone to disease. . Skin cancer is the deadliest form of cancers in humans and it is of two
types namely: malignant melanoma and non-malignant melanoma. Melanoma can be
cured completely if it is detected early. Only an expert dermatologist can classify which
one is malignant. And which one is non-malignant. Common symptoms of melanoma are
the appearance of new moles or changes in existing moles.One of the first steps to
diagnosing melanoma is to do a physical examination using dermoscopy. The borders of
these melanomas are often indistinct, making visual identification without a
dermatoscope very difficult. The dermoscopy image of skin cancer is taken and it is
subjected to various pre-processing and image filtering. The cancer affected region is
separated from the healthy skin using Segmentation. Medical images play vital role in
assisting health care providers in proper diagnosis and correct treatment. Digital image
processing techniques can identify the features more accurately and provide the
appropriate status on disease.
1. INTRODUCTION:

Skin cancer is the out-of-control growth of abnormal cells in the epidermis, the
outermost skin layer and melanoma is a type of skin cancer , melanomas are mostly
caused by exposure to ultraviolet radiation that damages to DNA of skin cells.. The first
steps to diagnosing melanoma are to do a physical examination using dermoscopy. A
computer assisted technology is needed to help classifying the results of dermoscopy.
Cell morphology has become a standard theory for computerized cell image processing
and pattern recognition. Morphological cell analysis is a key issue for abnormality
identification and classification, early cancer detection, and dynamic changes analysis
under specific environmental stress. As more and more imaging data becomes available,
innovative software algorithms for image processing and analysis will be a critical need
for effective use of information presented by medical images.

Melanoma can appear on normal skin, or can appear as a mole or other area of the
skin that undergoes changes. Some moles that arise at birth can develop into melanoma.
In addition, melanoma can also occur in the eyes, ears, gingival of the upper jaw, tongue,
and lips.

By performing dermoscopy examination, it can assess the size, color, and texture
of moles that being suspected as melanoma. To determine a person with melanoma, a
dermatologist conducts research from the results of dermoscopy examinations obtained
and matched them with medical science to produce conclusions.
2.LITERATURE SURVEY

2.1 SURVEY OF EXISTING WORKS

1.Author: UzmaBanoAnsari1

Title: Skin Cancer Detection using Image Processing

Description:

Skin cancer is the most common cause of death amongst humans. Skin cancer is
abnormal growth of skin cells most often develops on body exposed to the sunlight, but
can occur anywhere on the body. Most of the skin cancers are curable at early stages. So
an early and fast detection of skin cancer can save the patient’s life. With the new
technology, early detection of skin cancer is possible at initial stage. Formal method for
diagnosis skin cancer detection is Biopsy method . It is done by removing skin cells and
that sample goes to various laboratory testing. It is painful and time consuming process.
We have proposed skin cancer detection system using svm for early detection of skin
cancer disease. It is more advantageous to patients. The diagnosing methodology uses
Image processing methods and Support Vector Machine (SVM) algorithm. The
dermoscopy image of skin cancer is taken and it goes under various pre-processing
technique for noise removal and image enhancement. Then the image is undergone to
segmentation using Thresholding method. Some features of image have to be extracted
using GLCM methodology. These features are given as the input to classifier. Support
vector Machine (SVM) is used for classification purpose. It classifies the given image
into cancerous or non-cancerous

2.Author:ChandrahasaM ,VarunVadigeri and Dixit Salecha(2016)

Title: Detection of skin cancer using ABCD features

Description:
Smartphones are playing major role in e-health in such a way that m-health is
playing a significant role in healthcare industry. Image processing techniques are
instrumental in healthcare industry to detect abnormalities in human body. Skin cancer
(Melanoma) is one of the most deadly cancers, but when diagnosed early, it can be cured.
Reports tell that more than million deaths occur due to Skin cancer itself. This paper
speaks about how skin cancer can be detected in early stages using smartphone
application by analyzing properties of the cancer, Asymmetry, Border, Color variation,
Diameter and Expansion(ABCDE).These properties are analyzed using different image
processing techniques like Grey scale conversion, Segmentation, contour tracing and
histogram analysis.

3.Author: E. A. Gordon Spratt and J. A. Carucci

Title:Methodology for diagnosing of skin cancer onimages of

dermatologicspots by spectral analysis

Description:

In this paper a new methodology for the diagnosing of skincancer on images of


dermatologic spots using image processing ispresented. Currently skin cancer is one of
the most frequent diseases inhumans. This methodology is based on Fourier spectral
analysis by usingfilters such as the classic, inverse and k-law nonlinear. The sample
imageswere obtained by a medical specialist and a new spectral technique isdeveloped to
obtain a quantitative measurement of the complex patternfound in cancerous skin spots.
Finally a spectral index is calculated toobtain a range of spectral indices defined for skin
cancer.
4.Author:JosuéÁlvarez-Borrego(2015)

Title: Diagnosis of Skin cancer using Image Processing

Description:

In this paper a new methodology for the diagnosing of skin cancer on images of
dermatologic spots using image processing is presented. Currently skin cancer is one of
the most frequent diseases in humans. This methodology is based on Fourier spectral
analysis by using filters such as the classic, inverse and k-law nonlinear. The sample
images were obtained by a medical specialist and a new spectral technique is developed
to obtain a quantitative measurement of the complex pattern found in cancerous skin
spots. Finally a spectral index is calculated to obtain a range of spectral indices defined
for skin cancer. Our results show a confidence level of 95.4%.

5.Author:M.M. Rahman, P. Bhattacharya(2009)

Title:Automated Dermoscopy Image Analysis of Pigmented Skin Lesions

Description:

This paper presents an integrated and interactive decision support system for the
automated melanoma recognition of the dermoscopic images based on image retrieval by
content and multiple expert fusion. In this context, the ultimate aim is to support the
decision making by retrieving and displaying the rel-evant past cases as well as
predicting the image categories (e.g., melanoma, benign and dysplastic nevi)by
combining outputs from different classifiers. However, the most challenging aspect in
this domain is to detect the lesion from the healthy background skin and extract the
lesion-specific local image fea-tures. A thresholding-based segmentation method is
applied on the intensity images generated from two different schemes to detect the lesion.
3. SYSTEM REQUIREMENT:

HARDWARE REQUIREMENTS:

Processor : PENTIUM IV

Ram : 1 GB SD RAM

Monitor : 15” COLOR

Hard Disk : 80 GB

Keyboard : STANDARD 102 KEYS

Mouse : 3 BUTTON

SOFTWARE CONFIGURATION:

Operating System : Windows

Environment : MATLAB

Matlab : Any version


4. EXISTING SYSTEM:

The diagnosis of skin cancer detection systems. The common approach of


designing is

 Image Acquisition
 Image preprocessing

Image Acquisition

The database images we use contain digital images taken by means of a digital
camera. These images are fed into a computer system for further processing.

The images mainly dealt for the research are RGB images. Since color is a
powerful descriptor the RGB images are considered for the paper. The database images
are obtained from different sources and the size of the images is non-standard.

Image preprocessing

Preprocessing as the fundamental stage of detection system helps to enhance the


quality of an image by removing hairs, noise and air bubbles on the skin.

The enhanced image is used for feeding the next step. In preprocessing of an
image, there are many existing techniques which can be classified into two groups; binary
and gray color images. The common images chosen for research here are color images.

Disadvantages:

An image is segmented band allocation of each pixel of the image to existing


classes that would finally lead to the lesion segregation from the healthy skin.
5. PROPOSED SYSTEM:

In our methodology, the image is first enhanced by CNN with obtaining the
highest frequency components from its Curve let transform and then add it to the original
image, in order to sharpen the edge detail. Subsequently the sharpened image is subjected
to morphological processing and thresholding to get a binary image, from which
boundaries are extracted after morphological processing. In the end, an Otsu algorithm is
applied to get normal skin and the cancerous skin. I thus propose a computerized
solution for replacing the clinical calculations by feature exatraction.

Wiener filtering

Wiener filtering executes an optimal tradeoff between inverse filtering and noise
smoothing. Wiener filter estimates the local mean and variance around each pixel.

A local contrast enhancement method for RGB images utilizes morphological


filtering to obtain the scale specific dark and bright features from the input image.

Project procedure involves the following steps:

1. For any segmentation strategy, noise removal is a must, a priori, lest one
may get a lot of false edges. Our method starts with the removal of unwanted particles or
noise present in the image (I), through the use of Weiner filter to get IW. The latter is
useful in thesituations where the purpose is to reduce noise but preserve the edges.
Wiener filter is statistical in nature as it adopts a least square (LS) approach for signal
recovery in the presence of noise. It is very effective in eliminating both the additive
noise and blur which are usually competing against each other.

2.A Forward Discrete Curvelet Transform (FDCT) is applied to the input image to get
the finest detailed coefficients. The FDCT is a multi-dimensional transform in the sense
that not only linear contours but also the curvy edges of the contained objects can be
captured through its use. Hence, the Curvelet transform captures the structural activity
along the radial wedges in the frequency domain and has a very high directional
sensitivity. It captures singularities with very few coefficients in a non-adaptive manner.
The edge and singularity details are processed to extract the feature points.

3.The obtained high-pass image (IHP) is added to IW and we get an enhanced SEM
image (Ie). The image would now have stronger edges than the original and would
perform better in lending edgedetails to the segmentation step.

4.The mask is further refined via Mathematical Morphology (MM) processing, getting
(IM), in order to further highlight the image boundaries. The segmented image (IS) is
formed by superimposing the mask (IM) on the image IE and the regions are separated by
setting all the pixels to 1 that belong to the set of the segmentation boundary.

Advantages:

According to the results and comparison with the results of clinical diagnosis , the
proposed method has 94% accuracy in green channel, which indicates a better
performance than other color spaces.
6. SYSTEM DESIGN:

DATAFLOW DIAGRAM:
CLUSTER DIAGRAM:
USE CASE DIAGRAM:
7. ALGORITHM:

USING CNN ALGORITHM FOR IMAGE PROCESSING:

1. Convolutional layer:

The convolution operation extracts different features of the input.

2. Pooling layer:

The pooling/subsampling layer reduces the resolution of the features

3. Non Linear Layer:

Non-linear “trigger” function to signal distinct identification of likely features on


each hidden layer.

4. Fully connected layer:

In fully connected layer, all the elements of all the features of the previous layer
get used in the calculation of each element of each output feature.
8. FUNCTIONAL REQUIREMENTS:

DOMAIN REQUIREMENTS

The domain of this project is MATLAB. The MATLAB is explained in


detail below.

SOFTWARE TOOLS AND METHODOLOGY

ABOUT MATLAB

MATLAB is a software package for high performance numerical computation and


visualization. It provides an interactive environment with hundreds of built-in functions
for technical computation, graphics and animation. Best of all, it provides easy
extensibility with its own high-level programming language. The name MATLAB stands
for MATrixLABoratory. The basic building block of MATLAB is the matrix. The
fundamental data type is the array.

MATLABs built-in functions provide excellent tools for linear algebra


computations, data analysis, signal processing, optimization, numerical solutions of
ODES, quadrature and many other types of scientific computations. Most of these
functions use the state-of-the art algorithms. There are numerous functions for 2-D and 3-
D course, MATLAB even provides an external interface to run those programs from with
in MATLAB. The user, however, is not limited to the built-in functions, he can write his
own functions in the MATLAB language. Once written, these functions behave just like
the built-in functions. MATLAB’s language is very easy to learn and to use.

MATLAB TOOLBOXES

There are several optional ‘Toolboxes’ available from the developers of the
MATLAB. These tool boxes are collection of functions written for special applications
such as Symbolic Computations Toolbox, Image Processing Toolbox, Statistics Toolbox,
and Neural Networks Toolbox, Communications Tool box, Signal Processing Toolbox,
Filter Design Toolbox, Fuzzy Logic Toolbox, Wavelet Toolbox, Data base Toolbox,
Control System Toolbox, Bioinformatics Toolbox, Mapping Toolbox.

BASICS OF MATLAB

MATLAB WINDOWS

On all Unix systems, Macs, and PC, MATLAB works through three basic
windows. They are:

a. Command window:

This is the main window. The MATLAB command prompt characterizes it


‘>>’.when you launch the application program, MATLAB puts you in this window .All
commands, including those for running user-written programs, are typed in this window
at the MATLAB prompt.

b. Graphics window:

The output of all graphics commands are typed in the command window are
flushed to the graphics or figure window, a separate gray window with(default) white
background colour. The user can create as many figure windows, as the system memory
will allow.

c. Edit window:

This is where you write, edit, create, and save your own programs in files called
M-files. We can use any text editor to carry out these tasks. On the most systems, such as
PC’s and Macs, MATLAB provides its build in editor. On other systems, you can invoke
the edit window by typing the standard file editing command that you normally use on
your systems. The command is typed at the MATLAB prompt following the special
character ‘!’ character. After editing is completed, the control is returned to the
MATLAB.

On-Line Help

a. On-line documentation:

MATLAB provides on-line help for all its built-in functions and programming
language constructs. The commands look for, help, help win, and helpdesk provides on-
line help.

b. Demo:

MATLAB has a demonstration program that shows many of its features. The
program includes a tutorial introduction that is worth trying. Type demo at the MATLAB
prompt to invoke the demonstration program, and follow the instruction on the screen.

Input-Output

MATLAB supports interactive computation taking the input from the screen, and
flushing the output to the screen. In addition, it can read input files and write output files.
The following features hold for all forms of input-output.

a. Data type

The fundamental data type in the MATLAB is the array. It encompasses


several distinct data objects-integers, doubles , matrices ,character strings ,and cells. In
most cases, however, we never have to worry about the data type or the data object
declarations. For example there is no need to declare variables, as real or complex .When
a real number is entered as the variable, MATLAB automatically sets the variable to be
real.

b. Dimensioning
Dimensioning is automatic in MATLAB. No dimensioning statements are required
for vectors or arrays. We can find the dimension of an existing matrix or a vector with the
size and length commands.

C. Case sensitivity

MATLAB is case sensitive i.e. it differentiates between the lower case and the

uppercase letters. Thus a and A are different variables. Most MATLAB commands
are built-in function calls are typed in lower case letters. We can turn case sensitivity on
and off with casesen command.

d. Output display

The output of every command is displayed on the screen unless MATLAB


is directed otherwise. A semicolon at the end of a command suppresses the screen output,
except for graphics and on-line help command. The following facilities are provided for
controlling the screen output.

i. Paged output

To direct the MATLAB to show one screen of output at a time, type more on the
MATLAB prompt. Without it, MATLAB flushes the entire output at once, without
regard to the speed at which we read.

ii. Output format

Though computations inside the MATLAB are performed using the double
precision, the appearance of floating point numbers on the screen is controlled by the
output format in use. There are several different screen output formats. The following
table shows the printed value of 10pi in different formats.

Format short 31.4159

Format short e 3.1416e+01


Format long 31.41592653589793

Format long e 3.141592653589793e+01

Format short g 31.416

Format long g 31.4159265358979

Format hex 403f6a7a2955385e

Format rat 3550/113

Format bank 31.42

e. Command History

MATLAB saves previously typed commands in a buffer. These commands can be


called with the up-arrow key. This helps in editing previous commands. You can also
recall a previous command by typing the first characters and then pressing the up-arrow
key. On most Unix systems, MATLABS command line editor also understands the
standard emacs key bindings.

File Types

MATLAB has three types of files for storing information

M-files: M-files are standard ASCII text files, with a .m extension to the file
name. There are two types of these files: script files and function files. Most programs we
write in MATLAB are saved as M-files. All built-in functions in MATLAB are M-files,
most of which reside on our computer in precompiled format. Some built in functions are
provided with source code in readable M-files so that can be copied and modified.

Mat-files: Mat-files are binary data-files with a .mat extension to the file name.
Mat-files are created by MATLAB when we save data with the save command. The data
is written in a special format that only MATLAB can read. Mat-files can be loaded into
MATLAB with the load command.

Mex-files: Mex-files are MATLAB callable Fortran and C programs, with a.mex
extension to the file name. Use of these files requires some experience with MATLAB
and a lot of patience.

Platform independence

One of the best features of MATLAB is its platform-independence. Programs


written in the MATLAB language work exactly the same way on all computers. The user
interface however, varies from platform to platform. For example, on PC’s and Macs
there are menu driven commands for opening, writing, editing, saving and printing files
whereas on Unix machines such as sun workstations, these tasks are usually performed
with Unix commands.

Images in MATLAB

The project has involved understanding data in MATLAB, so below is a brief


review of how images are handled. Indexed images are represented by two matrices, a
color map matrix and image matrix.

(i)The color map is a matrix of values representing all the colours in the image.

(ii)The image matrix contains indexes corresponding to the colour map color map.

A color map matrix is of size N*3, where N is the number of different colors I the
image. Each row represents the red, green, blue components for a colour.

e.g the matrix

Represents two colours, the first have components r1, g1,b1 and the second
having the components r2,g2,b2
The wavelet toolbox only supports indexed images that have linear, monotonic
color maps. Often color images need to be pre-processed into a grey scale image before
using wavelet decomposition. The Wavelet Toolbox User’s Guide provides some sample
code to convert color images into grey scale. This will be useful if it is needed to put any
images into MATLAB.

This chapter dealt with introduction to MATLAB software which we are using for
our project. The 2-D wavelet Analysis, the decomposition of an image into
approximations and details and the properties of different types of wavelets will be
discussed in the next chapter.

MATLAB

Matlab is a high-performance language for technical computing.

It integrates computation, programming and visualization in a user-friendly


environment where problems and solutions are expressed in an easy-to-understand
mathematical notation.

Matlab is an interactive system whose basic data element is an array that


does not

Require dimensioning.

This allows the user to solve many technical computing problems,


especially those with matrix and vector operations, in less time than it would take to write
a program in a scalar non-interactive language such as C or FORTRAN.

Matlab features a family of application-specific solutions which are called


toolboxes.
It is very important to most users of Matlab, that toolboxes allow to learn
and apply

Specialized technology.

These toolboxes are comprehensive collections of Matlab functions, so-


called M-files that extend the Matlab environment to solve particular classes of problems.

Matlab is a matrix-based programming tool. Although matrices often need


not to be

Dimensioned explicitly, the user has always to look carefully for matrix
dimensions.

If it is not defined otherwise, the standard matrix exhibits two dimensions n


× m.

Column vectors and row vectors are represented consistently by n × 1 and 1


× n matrices, respectively.

MATLAB OPERATIONS

Matlab operations can be classified into the following types of operations:

Arithmetic and logical operations,

Mathematical functions,

Graphical functions, and

Input/output operations.

In the following sections, individual elements of Matlab operations are


explained in detail.
EXPRESSIONS

Like most other programming languages, Matlab provides mathematical


expressions,

But unlike most programming languages, these expressions involve entire


matrices. The building blocks of expressions are

Variables

Numbers

Operators

Functions

VARIABLES

Matlab does not require any type declarations or dimension statements.

When a new variable name is introduced, it automatically creates the


variable and allocates the appropriate amount of memory.

If the variable already exists, Matlab changes its contents and, if necessary,
allocates new storage.

For example

>> books = 10

It creates a 1-by-1 matrix named books and stores the value 10 in its single
element.

In the expression above, >> constitutes the Matlab prompt, where the
commands can be entered.
Variable names consist of a string, which start with a letter, followed by
any number of letters, digits, or underscores. Matlab is case sensitive; it distinguishes
between uppercase and lowercase letters. A and a are not the same variable.

To view the matrix assigned to any variable, simply enter the variable
name.

NUMBERS

Matlab uses the conventional decimal notation.

A decimal point and a leading plus or minus sign is optional. Scientific


notation uses the letter e to specify a power-of-ten scale factor.

Imaginary numbers use either i or j as a suffix.

Some examples of legal numbers are:

7 -55 0.0041 9.657838 6.10220e-10 7.03352e21 2i -2.71828j 2e3i 2.5+1.7j.

OPERATORS

Expressions use familiar arithmetic operators and precedence rules. Some


examples are:

+ Addition

- Subtraction

* Multiplication

/ Division

’ Complex conjugate transpose

( ) Brackets to specify the evaluation order.

FUNCTIONS
Matlab provides a large number of standard elementary mathematical
functions, including sin, sqrt, expand abs.

Taking the square root or logarithm of a negative number does not lead to
an error; the appropriate complex result is produced automatically.

Matlab also provides a lot of advanced mathematical functions, including


Bessel and Gamma functions. Most of these functions accept complex arguments.

For a list of the elementary mathematical functions, type

>> help elfun

Some of the functions, like sqrt and sin are built-in. They are a fixed part of
the Matlab core so they are very efficient.

The drawback is that the computational details are not readily accessible.
Other functions, like gamma and sinh, are implemented in so called M-files.

You can see the code and even modify it if you want.

MATLAB IMAGE PROCESSING:

INTRODUCTION

When working with images in Matlab, there are many things to keep in mind such
as loading an image, using the right format, saving the data as different data types, how to
display an image, conversion between different image formats, etc. This worksheet
presents some of the commands designed for these operations. Most of these commands
require you to have the Image processing tool box installed with Matlab. To find out if it
is installed, type ver at the Matlab prompt. This gives you a list of what tool boxes that
are installed on your system.
For further reference on image handling in Matlab you are recommended to use
Mat lab’s help browser. There is an extensive (and quite good) on-line manual for the
Image processing tool box that you can access via Mat lab’s help browser.

The first sections of this worksheet are quite heavy. The only way to understand
how the presented commands work is to carefully work through the examples given at the
end of the worksheet. Once you can get these examples to work, experiment on your own
using your favorite image!

FUNDAMENTALS

A digital image is composed of pixels which can be thought of as small dots on the
screen. A digital image is an instruction of how to color each pixel. We will see in detail
later on how this is done in practice. A typical size of an image is 512-by-512 pixels.
Later on in the course you will see that it is convenient to let the dimensions of the image
to be a power of 2. For example, 29=512. In the general case we say that an image is of
size m-by-n if it is composed of m pixels in the vertical direction and n pixels in the
horizontal direction.

Let us say that we have an image on the format 512-by-1024 pixels. This means
that the data for the image must contain information about 524288 pixels, which requires
a lot of memory! Hence, compressing images is essential for efficient image processing.
You will later on see how Fourier analysis and Wavelet analysis can help us to compress
an image significantly. There are also a few "computer scientific" tricks (for example
entropy coding) to reduce the amount of data required to store an image.

IMAGE FORMATS SUPPORTED BY MATLAB

The following image formats are supported by Matlab:

BMP
HDF

JPEG

PCX

TIFF

XWB

Most images you find on the Internet are JPEG-images which is the name for one
of the most widely used compression standards for images. If you have stored an image
you can usually see from the suffix what format it is stored in. For example, an image
named myimage.jpg is stored in the JPEG format and we will see later on that we can
load an image of this format into Matlab.

WORKING FORMATS IN MATLAB

If an image is stored as a JPEG-image on your disc we first read it into Matlab.


However, in order to start working with an image, for example perform a wavelet
transform on the image, we must convert it into a different format. This section explains
four common formats.

INTENSITY IMAGE (GRAY SCALE IMAGE)

This is the equivalent to a "gray scale image" and this is the image we will mostly
work with in this course. It represents an image as a matrix where every element has a
value corresponding to how bright/dark the pixel at the corresponding position should be
colored. There are two ways to represent the number that represents the brightness of the
pixel: The double class (or data type). This assigns a floating number ("a number with
decimals") between 0 and 1 to each pixel.

The value 0 corresponds to black and the value 1 corresponds to white. The other
class is called uint8 which assigns an integer between 0 and 255 to represent the
brightness of a pixel. The value 0 corresponds to black and 255 to white. The class uint8
only requires roughly 1/8 of the storage compared to the class double. On the other hand,
many mathematical functions can only be applied to the double class. We will see later
how to convert between double and uint8.

BINARY IMAGE

This image format also stores an image as a matrix but can only color a pixel black
or white (and nothing in between). It assigns a 0 for black and a 1 for white.

INDEXED IMAGE

This is a practical way of representing color images. (In this course we will mostly
work with gray scale images but once you have learned how to work with a gray scale
image you will also know the principle how to work with color images.) An indexed
image stores an image as two matrices. The first matrix has the same size as the image
and one number for each pixel. The second matrix is called the color map and its size
may be different from the image. The numbers in the first matrix is an instruction of what
number to use in the color map matrix.

RGB IMAGE

This is another format for color images. It represents an image with three matrices
of sizes matching the image format. Each matrix corresponds to one of the colors red,
green or blue and gives an instruction of how much of each of these colors a certain pixel
should use.

MULTIFRAME IMAGE
In some applications we want to study a sequence of images. This is very common
in biological and medical imaging where you might study a sequence of slices of a cell.
For these cases, the multiframe format is a convenient way of working with a sequence of
images. In case you choose to work with biological imaging later on in this course, you
may use this format.

How to convert between different formats

The following table shows how to convert between the different formats given
above. All these commands require the Image processing tool box!

IMAGE FORMAT CONVERSION

(Within the parenthesis you type the name of the image you wish to convert.)

Operation: Matlab command:

Convert between intensity/indexed/RGB formats to binary format. dither()

Convert between intensity format to indexed format. gray2ind()

Convert between indexed format to intensity format. ind2gray()

Convert between indexed format to RGB format. ind2rgb()

Convert a regular matrix to intensity format by scaling. mat2gray()

Convert between RGB format to intensity format. rgb2gray()

Convert between RGB format to indexed format. rgb2ind()

The command mat2gray is useful if you have a matrix representing an image but
the values representing the gray scale range between, let's say, 0 and 1000. The command
mat2gray automatically re scales all entries so that they fall within 0 and 255 (if you use
the uint8 class) or 0 and 1 (if you use the double class).
How to convert between double and uint8

When you store an image, you should store it as a uint8 image since this requires
far less memory than double. When you are processing an image (that is performing
mathematical operations on an image) you should convert it into a double. Converting
back and forth between these classes is easy.

I=im2double (I);

Converts an image named I from uint8 to double.


9. SYSTEM TESTING:

Testing is vital to the success of the system. System testing makes a logical
assumption that if all parts of the system are correct, the goal will be successfully
achieved. In the testing process we test the actual system in an organization and gather
errors from the new system operates in full efficiency as stated. System testing is the
stage of implementation, which is aimed to ensuring that the system works accurately and
efficiently.

In the testing process we test the actual system in an organization and gather
errors from the new system and take initiatives to correct the same. All the front-end and
back-end connectivity are tested to be sure that the new system operates in full efficiency
as stated. System testing is the stage of implementation, which is aimed at ensuring that
the system works accurately and efficiently.

TESTING OBJECTIVES

The main objective of testing is to uncover errors from the system. For the
uncovering process we have to give proper input data to the system. So we should have
more conscious to give input data. It is important to give correct inputs to efficient
testing.

Testing is done for each module. After testing all the modules, the modules are
integrated and testing of the final system is done with the test data, specially designed to
show that the system will operate successfully in all its aspects conditions. Thus the
system testing is a confirmation that all is correct and an opportunity to show the user that
the system works. Inadequate testing or non-testing leads to errors that may appear few
months later.
This will create two problems, Time delay between the cause and appearance of
the problem. The effect of the system errors on files and records within the system. The
purpose of the system testing is to consider all the likely variations to which it will be
suggested and push the system to its limits.

The testing process focuses on logical intervals of the software ensuring that all
the statements have been tested and on the function intervals (i.e.,) conducting tests to
uncover errors and ensure that defined inputs will produce actual results that agree with
the required results. Testing has to be done using the two common steps Unit testing and
Integration testing. In the project system testing is made as follows:

The procedure level testing is made first. By giving improper inputs, the errors
occurred are noted and eliminated. This is the final step in system life cycle. Here we
implement the tested error-free system into real-life environment and make necessary
changes, which runs in an online fashion. Here system maintenance is done every months
or year based on company policies, and is checked for errors like runtime errors, long run
errors and other maintenances like table verification and reports.

TYPES OF TESTING

Integration Testing is a level of software testing where individual units are


combined and tested as a group.

The purpose of this level is to expose faults in the interaction between integrated
units. Test drivers and test stubs are used to assist in Integration testing.

METHOD

Any of Black Box Testing, White Box Testing, and Gray Box Testing methods
can be used. Normally, the method depends on your definition of ‘unit’.

TASKS

Integration Test Plan


Prepare

Review

Rework

Baseline

Integration Test Cases/Scripts

Prepare

Review

Rework

Baseline

Integration Test

Perform

UNIT TESTING

Unit testing verification efforts on the smallest unit of software design, module.
This is known as “Module Testing”. The modules are tested separately. This testing is
carried out during programming stage itself. In these testing steps, each module is found
to be working satisfactorily as regard to the expected output from the module.

INTEGRATION TESTING

Integration testing is a systematic technique for constructing tests to uncover error


associated within the interface. In the project, all the modules are combined and then the
entire programmer is tested as a whole. In the integration-testing step, all the error
uncovered is corrected for the next testing steps.
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

WHITE BOX TESTING

White-box testing (also known as clear box testing, glass box testing, transparent
box testing, and structural testing) is a method of testing software thattests internal
structures or workings of an application, as opposed to its functionality (i.e. black-box
testing).

BLACK BOX TESTING

Black box testing, also known as Behavioral Testing, is a software testing method
in which the internal structure/ design/ implementation of the item being tested is not
known to the tester. These tests can be functional or non-functional, though usually
functional.

SYSTEM TESTING

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


integrated system to evaluate the system's compliance with its specified requirements.
System testing falls within the scope of black-box testing, and as such, should require no
knowledge of the inner design of the code or logic.

10. SAMPLE CODE


close all

• clear all

• clc

• %%

• globalInput_Image

• global EN_IP

• % Browse input image from Data base

• [filename pathname id] = uigetfile({'* .jpg'},'Select input image',[cd


'\images']);

• if ~id,return,end

• Input_Image = double(imread([pathname filename]))/255;

• fullpathname = strcat(pathname,filename);

• figure,imshow(Input_Image), title('Input Image')


• pause (2)

• %%

• RGB_G = rgb2gray(Input_Image);

• figure, imshow(RGB_G);

• G_NSE = imnoise(RGB_G,'gaussian',0,0.025);

• figure,imshow(G_NSE)

• pause (2)

• %%

• %after removing noise by Gaussian method

• FLTD_IMG = wiener2(G_NSE,[5,5]);

• figure, imshow(FLTD_IMG)

• pause (2)


• %%

• %using unsharpfiltering(The gray image is again converted to

• %using unsharp masking filter

• h=fspecial('unsharp');

• US_IMG=imfilter(Input_Image,h);

• figure,imshow(US_IMG),title('filtered iamge');

• pause (2)

• %% Boundary Extraction

• RGB_G(RGB_G>255)=0;


• S=strel('disk',4,0);%structuring element

• D=~im2bw(Input_Image);

• D=~im2bw(Input_Image);

• F=imerode(D,S);

• figure,imshow(D);title('binary image');

• pause (2)

• %%

• INP_SVMS = im2bw(Input_Image, graythresh(Input_Image));

• % imshow(bw)

• INP_SVMS = bwareaopen(INP_SVMS, 50);

• % imshow(bw)

• INP_GRP = bwlabel(INP_SVMS);

• INP_TR_ST = regionprops(INP_GRP,'PixelIdxList');

• % Initialize vector containing max values.

• MAX_VAL = zeros(numel(INP_TR_ST), 1);

• for k = 1:numel(INP_TR_ST)

• MAX_VAL(k) = max(Input_Image(INP_TR_ST(k).PixelIdxList));

• end

• INP_TR_S1 = find(MAX_VAL <150)

• INP_TR_ST=bwareaopen(INP_TR_S1,20)

• INP_TR_S1

• %%

• % se = strel('disk',1);

• % a_bw = imclose(INP_TR_ST,se);

• % a_bw=~INP_TR_ST;

• img2=im2bw(Input_Image,graythresh(Input_Image));

• figure, imshow(img2)

• pause (2)


• B = bwboundaries(img2);

• figure, imshow(img2)

• cc = bwconncomp(img2,4);

• number =cc.NumObjects;

• number

• s =regionprops(img2, 'Area');

• N_O = numel(s);

• N_O

• % INP_TR_S1

• hold on

• %% Image Classification

• SRC=im2double(Input_Image);

• In1=SRC(:,:,1);

• IN2=SRC(:,:,1);

• IN3=SRC(:,:,1);


• INP_S_VL=(In1+IN2+IN3)/3;

• SBL_VL = fspecial('sobel');

• SBL_VL_INV = SBL_VL';

• SB_FLT = imfilter(double(INP_S_VL), SBL_VL, 'replicate');

• SB_RPLKT = imfilter(double(INP_S_VL), SBL_VL_INV, 'replicate');

• SR_V = sqrt(SB_RPLKT.^2 + SB_FLT.^2);

• INP_CNV_FLT = deconvwnr(INP_S_VL,SBL_VL);

• LN_VAL = watershed(INP_CNV_FLT);

• LBL_IMG = label2rgb(LN_VAL);

• figure,imshow(LBL_IMG);title('Imege Analysis')

• STRL_FUN = strel('disk',20);

• IN_BW_OPN = imopen(INP_S_VL, STRL_FUN);

• IS_VL = imerode(INP_S_VL, STRL_FUN);


• IR_VL = imreconstruct(IS_VL, INP_S_VL);

• EN_FUN = imclose(IN_BW_OPN, STRL_FUN);

• IMG_DLT = imdilate(IR_VL, STRL_FUN);

• IMG_RCNST = imreconstruct(imcomplement(IMG_DLT),
imcomplement(IR_VL));

• IMG_RCNST = imcomplement(IMG_RCNST);

• figure, imshow(IMG_RCNST);title('Imege Analysis')

• IMG_RGNL_ILM = imregionalmin(IMG_RCNST);

• figure,imshow(IMG_RGNL_ILM);title('Imege Analysis')

• FLM_IMG = INP_S_VL;

• FLM_IMG(IMG_RGNL_ILM) = 255;

• figure, imshow(FLM_IMG);title('Imege Analysis')

• IMG_STRL_FUN = strel(ones(7,7));

• IM_FGM2 = imclose(IMG_RGNL_ILM, IMG_STRL_FUN);


• IMG_FGM3 = imerode(IM_FGM2, IMG_STRL_FUN);

• IMG_FGM4 = bwareaopen(IMG_FGM3, 20);

• FNL = INP_S_VL;

• FNL(IMG_FGM4) = 255;

• FNL1=im2bw(FNL);

• a_citra_keabuan = rgb2gray(Input_Image);

• threshold = graythresh(a_citra_keabuan);

• a_bww = im2bw(a_citra_keabuan,threshold);

• a_bw = bwareaopen(a_bww,80);

• se = strel('disk',2);

• a_bw = imclose(a_bw,se);

• a_bw=~a_bww;

• [LBL,N_O]=bwlabel(a_bw,8);

• LBL

• N_O

• if (N_O > 200)


• uiwait(msgbox('Stage I:The Segmented Image is Normal stage'));

• else

• uiwait(msgbox('Stage II: The segmented Image is affected by Cancer'));

• end

• clc

TEST IMAGES:

INPUT(IMAGE):
PREPROCESSED IMAGE:

FILTER APPLIED IMAGE:


BOUNDARY EXTRACTION:

SEGMENTED IMAGE:
SCREENSHOTS:
CONCLUSION:

In this project, a classic image processing algorithm is designed to segment the


lesion picture for shape analysis. After demonstrating the dataset and method used in this
project, performance analysis shows that the algorithm can have an even better
performance on extracting shapes than the labels do. Finally, some improvement
suggestions are proposed to have further optimization of the algorithm.

RESULT COMPARISON WITH EXISTING SYSTEM

In existing sytem they were using 2D wavelet transform that is applied over the
segmented image to extract the features such as mean, standard deviation, absolute mean.
The network was trainedwith features. Therefore its accuracy rate is good however it can
be improved for this system. In our proposed system we are using wiener filter
curvlettransform. The curvelet transform is a multiscale directional transform that allows
an almost optimal nonadaptive sparse representation of objects with edges and are deeply
related to image processing and mainly for biological and scientific computing.In
addition we are usingOtsu's thresholding method it involves iterating through all the
possible threshold values and calculating a measure of spread for the pixel levels each
side of the threshold, i.e. the pixels that either fall in foreground or background.

FUTURE ENHANCEMENT:

Computer vision and image classification problem were among the main factors of
development of deep learning, because AI researchers aimed to learn features from raw
of images which require higher computations and memory resources in compare to text
and numerical learning models.Artificial Neural Network (ANN) is the very fundamental

of deep learning. We can use Artifical Neural Networks in future. ANN originally
presented by the neurophysiologist Warren McCulloch. They proposed the first neural
network architecture (computational model) inspired from human biological neuron.
REFERENCES

1. M. J. Eide, M. M. Asgari, S. W. Fletcher, A. C. Geller, A. C. Halpern, W. R.


Shaikh, L. Li, G. L. Alexander, A. Altschuler, S. W. Dusza, A. A. Marghoob, E. A.
Quigley, and M. A. Weinstock; Informed (Internet course for Melanoma Early Detection)
Group, “Effects on skills and practice from a web-based skin cancer course for primary
care providers,” J. Am. Board Fam. Med. 26(6), 648–657 (2013).

2. 2. American Cancer Society.Cancer Facts and Figs. (2014).

3. 3. N. R. Telfer, G. B. Colver, and C. A. Morton; British Association of


Dermatologists, “Guidelines for the management of basal cell carcinoma,” Br. J.
Dermatol.159(1), 35–48 (2008).

4. 4. A. Kricker, B. Armstrong, V. Hansen, A. Watson, G. Singh-Khaira, C.


Lecathelinais, C. Goumas, and A. Girgis, “Basal cell carcinoma and squamous cell
carcinoma growth rates and determinants of size in community patients,” J. Am. Acad.
Dermatol. 70(3), 456–464 (2014).

5. 5. E. A. Gordon Spratt and J. A. Carucci, “Skin cancer in immunosuppressed


patients,” Facial Plast.Surg. 29(5), 402–410 (2013).

6. 6. S. Ogden and N. R. Telfer, “Skin cancer,” Medicine (Baltimore) 37(6), 305–


308 (2009).

7. 7. K. Korotkov and R. Garcia, “Computerized analysis of pigmented skin lesions:


a review,” Artif. Intell.Med. 56(2), 69–90 (2012).

8. 8. A. O. Berg, D. Best; US Preventive Services Task Force, “Screening for Skin


Cancer: recommendations and rationale,” Am. J. Prev. Med. 20(3 Suppl), 44–46 (2001).
9. 9. M. M. Rahman and P. Bhattacharya, “An integrated and interactive decision
support system for automated melanoma recognition of dermoscopic images,”
Comput.Med. Imaging Graph.34(6), 479–486 (2010).

10. 10. A. G. Isasi, B. G. Zapirain, and A. M. Zorrilla, “Melanomas non-invasive


diagnosis application based on the ABCD rule and pattern recognition image processing
algorithms,” Comput. Biol. Med. 41(9), 742–755 (2011).

You might also like