+ All Categories
Home > Documents > Lung Tumor Detection

Lung Tumor Detection

Date post: 21-Dec-2015
Category:
Upload: syed-emad
View: 221 times
Download: 1 times
Share this document with a friend
Description:
Presentation on Lung Tumor Detection
50
Transcript
Page 1: Lung Tumor Detection
Page 2: Lung Tumor Detection

PROJECT TITLE

Lungs Tumor Detection

Page 3: Lung Tumor Detection

GROUP MEMBERS

Muhammad Jabeer Khan (Sp10-Bce-011)

Mian Wisal Ahmad (Sp10-Bee-068)

Zeeshan Nazir (Sp10-bce-031)

Page 4: Lung Tumor Detection

PROJECT SUPERVISOR & CO-

SUPERVISOR

Engr Atiqa Kayan Engr Umairullah Tariq

Page 5: Lung Tumor Detection

PRESENTATION LAYOUT

Database (IMBA home public access library & INOR)

Image Acquisition Pre-Processing Gray level slicing Connected Components and labelling Morphological operations

Erosion and dilation Features Support vector machine

Page 6: Lung Tumor Detection

FLOW CHART

Image Acquisition

Pre-Processing

Segmentation

Post Processing

Feature Extraction

Page 7: Lung Tumor Detection

DATABASE

Collection of Lung images

Conversion from DICOM to jpg format

Training

Reference: https://eddie.via.cornell.edu/cgi-bin/datac/

signon.cgi

Page 8: Lung Tumor Detection

IMAGE ACQUISITION

C.T image from database

Input into MATLAB

Page 9: Lung Tumor Detection

PRE-PROCESSING

Gray scale image (elimination of hue and saturation)o Histogram Equalization Overview:

 It is for instance used to enhance Bone structures in x-rays or C.T images under-exposed photographs

Application:

Contrast Adjustment using image histogram

Page 10: Lung Tumor Detection

GRAY SCALE IMAGE

Page 11: Lung Tumor Detection

HISTOGRAM EQUALIZED IMAGE

Page 12: Lung Tumor Detection

GRAY LEVEL SLICING

Highlighting a specific range of gray-levels

Enhancing flaws in X-rays, C.T scans

Bit plane slicing

Plane by plane information acquisition

Threshold value of lung tumorRefrence:

Digital image processing by S Jayaraman, S Esakkirajan , S Veerakumar

Page 13: Lung Tumor Detection

GRAY LEVEL SLICING(CONT’D)

There are two main different approaches:  highlight a range of intensities while diminishing

all others to a constant low level.  highlight a range of intensities but preserve all

others

Page 14: Lung Tumor Detection

GRAY LEVEL SLICED IMAGE

Page 15: Lung Tumor Detection

CONNECTED COMPONENTS AND LABBELING

Finding the total no of connected regions in an image

Assigning a label to each connected region

Page 16: Lung Tumor Detection

ALGORITHM (FIRST PASS ASSIGNING LABELS)

Image

Assign New Label to pixel

Neighbors Not Labeled

Check Neighbor

s

Scan Pixel by Pixel

Pixel is not Background

Neighbors already labeled

Assign Neighbors

parent label to main label

Page 17: Lung Tumor Detection

ALGORITHM (SECOND PASS AGREEGATION)

Scan Each Pixel

Get Label’s Parent

Add to Existing List

Add to a new List

Parent is in

Pattern list

Pixel is Labeled

Yes No

Yes

Page 18: Lung Tumor Detection

STEP BY STEP WALKTHROUGHIn the beginning, we have this image, we start with currentLabelCount = 1

We found our non-background pixel

Page 19: Lung Tumor Detection

get its non-background neighbors

we set the current pixel to the currentLabelCount and increment it

Page 20: Lung Tumor Detection

on to the next pixel, this one has a neighbour which is already labeled

assigns the pixel's parent label to that of the neighbor

Page 21: Lung Tumor Detection

We continue on, none of the neighbours of this pixel is labeled

We increment currentLabelCount and assign it to the pixel, again its parent is set to itself

Page 22: Lung Tumor Detection

It gets interesting here, when neighbours have different labels

1) We choose main label (would be the smallest label in list--> (1))2) We set it to be the parent of the other labels

Page 23: Lung Tumor Detection

A few more rounds and we should end up with this. Notice the blue number in the upper right corner, that's the parent label, the de facto one upon which we aggregate later.

That's it, now all we have to do is pass the image again pixel by pixel, getting the root of each (if labeled) and store it in our patterns' list.

Page 24: Lung Tumor Detection

MORPHOLOGICAL OPERATIONS

Erosion

Dilation

Combine to Openning Object

Closening Background

Page 25: Lung Tumor Detection

STRUCTURING ELEMENT

Small set to probe the image under study

For each SE, define origo

Shape and size must be adapted to geometric

Properties for the objects

Page 26: Lung Tumor Detection

EROSION

The contraction of image (binary or grayscale) a.k.a region shrinking

Use structuring element on image data to produce new image

SE patterns that fits best on the image

Page 27: Lung Tumor Detection

IMAGE OF EROSION

Page 28: Lung Tumor Detection

HOW IT WORKS???

A pixel is turned on (1) only when the pixels of both structuring element and the pixels match other.

Both ON (1) and OFF (0) pixels should match.

Erodes to the right

Page 29: Lung Tumor Detection

difference

erosion

EROSION EXAMPLE

Page 30: Lung Tumor Detection

MATHEMATICAL DEFINITION OF EROSION

1. Erosion is the morphological dual to dilation.

2. It combines two sets using the vector subtraction of set elements.

3. Let denotes the erosion of A by BBA

){

}..,{2

2

BbeveryforAbxZx

baxtsAaanexistBbeveryforZxBA

Page 31: Lung Tumor Detection

DILATION FILLS HOLES

Fills in holes.

Smoothes object boundaries.

Adds an extra outer ring of pixels onto object boundary, ie, object becomes slightly larger.

Page 32: Lung Tumor Detection

IMAGE OF DILATION

Page 33: Lung Tumor Detection

X

B

difference

dilation

EXAMPLE OF DILATION

Page 34: Lung Tumor Detection

Dilation : x = (x1,x2) such that if we center B on them, then the so translated B intersects X.

MATHEMATICAL DEFINATION OF DILATION

Page 35: Lung Tumor Detection

IMAGE OF MORPHOLOGICAL OPERATIONS

Page 36: Lung Tumor Detection

TRAINING

One by one extraction of each labelled region.

Identifying tumor region.

Supervised learning through Support vector machine.

Page 37: Lung Tumor Detection

FEATURES FOR EXTRACTION

Area (305)

Eccentricity (0.5828)

Perimeter (84.7696)

Standard deviation (0.0275)

Mean (7.4599e-4)

Extent (0.6689)

Page 38: Lung Tumor Detection

SUPPORT VECTOR MACHINE

SVMs maximize the margin around the separating hyperplane.

A.k.a. large margin classifiers

The decision function is fully specified by a subset of training samples, the support vectors.

Solving SVMs is a quadratic programming problem

Page 39: Lung Tumor Detection

MAXIMUM MARGIN: FORMALIZATION w: decision hyperplane normal vector xi: data point i

yi: class of data point i (+1 or -1) Classifier is:

f(xi) = sign(wTxi + b)

Functional margin of xi is: yi (wTxi + b)

Functional margin of dataset is twice the minimum functional margin for any point The factor of 2 comes from measuring the

whole width of the margin

Page 40: Lung Tumor Detection

43

GEOMETRIC MARGIN

Distance from example to the separator is

Examples closest to the hyperplane are support vectors.

Margin ρ of the separator is the width of separation between support vectors of classes.

r

ρx

x′

w

Finding r:Dotted line x’−x is perpendicular todecision boundary so parallel to w.Unit vector is w/|w|, so line is rw/|w|.x’ = x – yrw/|w|. x’ satisfies wTx’+b = 0.So wT(x –yrw/|w|) + b = 0since |w| = sqrt(wTw).So wTx –yr|w| + b = 0So, solving for r gives:r = y(wTx + b)/|w|

Sec. 15.1

Page 41: Lung Tumor Detection

44

LINEAR SVM MATHEMATICALLYTHE LINEARLY SEPARABLE CASE

Assume that all data is at least distance 1 from the hyperplane, then the following two constraints follow for a training set {(xi ,yi)}

For support vectors, the inequality becomes an equality Then, since each example’s distance from the hyperplane is

The margin is:

wTxi + b ≥ 1 if yi = 1

wTxi + b ≤ −1 if yi = −1

Sec. 15.1

Page 42: Lung Tumor Detection

45

LINEAR SUPPORT VECTOR MACHINE (SVM)

Hyperplane wT x + b = 0

Extra scale constraint:

mini=1,…,n |wTxi + b| = 1

This implies:

wT(xa–xb) = 2

ρ = ||xa–xb||2 = 2/||w||2wT x + b = 0

wTxa + b = 1

wTxb + b = -1

ρ

Sec. 15.1

Page 43: Lung Tumor Detection

46

LINEAR SVMS MATHEMATICALLY (CONT.)

Then we can formulate the quadratic optimization

A better formulation (min ||w|| = max 1/ ||w|| ):

Find w and b such that

is maximized; and for all {(xi , yi)}

wTxi + b ≥ 1 if yi=1; wTxi + b ≤ -1 if yi = -1

Find w and b such that

Φ(w) =½ wTw is minimized;

and for all {(xi ,yi)}: yi (wTxi + b) ≥ 1

Sec. 15.1

Page 44: Lung Tumor Detection

47

THE OPTIMIZATION PROBLEM SOLUTION

Each non-zero αi indicates that corresponding xi is a support vector.

Classifying function will have the form:

Relies on an inner product between the test point x and the support vectors xi

w =Σαiyixi b= yk- wTxk for any xk such that αk 0

f(x) = ΣαiyixiTx + b

Sec. 15.1

Page 45: Lung Tumor Detection

48

NON-LINEAR SVMS Datasets that are linearly separable (with some noise)

work out great:

Hard dataset to be classified

Mapping data to a higher-dimensional space:

0

x2

x

0 x

0 x

Sec. 15.2.3

Page 46: Lung Tumor Detection

49

NON-LINEAR SVMS: FEATURE SPACES

General idea: the original feature space can always be mapped to some higher-dimensional feature space where the training set is separable:

Φ: x → φ(x)

Sec. 15.2.3

Page 47: Lung Tumor Detection

50

THE “KERNEL TRICK”

The linear classifier relies on an inner product between vectors K(xi,xj)=xi

Txj

If every datapoint is mapped into high-dimensional space via some transformation Φ: x → φ(x), the inner product becomes:

K(xi,xj)= φ(xi) Tφ(xj)

A kernel function is some function that corresponds to an inner product in some expanded feature space.

Example:

2-dimensional vectors x=[x1 x2]; let K(xi,xj)=(1 + xiTxj)2

,

Need to show that K(xi,xj)= φ(xi) Tφ(xj):

K(xi,xj)=(1 + xiTxj)2

,= 1+ xi12xj1

2 + 2 xi1xj1 xi2xj2+ xi2

2xj22 + 2xi1xj1 + 2xi2xj2=

= [1 xi12 √2 xi1xi2 xi2

2 √2xi1 √2xi2]T [1 xj12 √2 xj1xj2 xj2

2 √2xj1 √2xj2]

= φ(xi) Tφ(xj) where φ(x) = [1 x1

2 √2 x1x2 x22 √2x1 √2x2]

Sec. 15.2.3

Page 48: Lung Tumor Detection

51

KERNELS

Why use kernels? Make non-separable problem separable. Map data into better representational space

Common kernels Linear Polynomial K(x,z) = (1+xTz)d

Gives feature conjunctions Radial basis function (infinite dimensional space)

Sec. 15.2.3

Page 49: Lung Tumor Detection

TIMELINE

1st Presentation

• Study of project

2nd Presentation

• Image Acquisition and Pre-Processing

3rd Presentation

• Gray Level Slicing and Connected Components Labeling

4th Presentation

• Feature Extraction and SVM

5th Presentation

• Presenting the project to external examiner

52

Page 50: Lung Tumor Detection

Recommended