50
“MRI IMAGE SEGMENTATION USING ACTIVE CONTOUR MODEL “ Shashank Janardan 090912022 Mtech (Biomedical engineering ) Under guidance of Dr. N. PRADHAN Mrs. RAJITHA K V and Professor and Head & Mrs. HILDA MAYROSE Department of Psychopharmacology, Assistant Professors, NIMHANS, Department of Biomedical Bangalore. Engineering, MIT, Manipal.

Shashank Ppt

Embed Size (px)

Citation preview

Page 1: Shashank Ppt

“MRI IMAGE SEGMENTATION USING ACTIVE CONTOUR MODEL “

Shashank Janardan

090912022

Mtech (Biomedical engineering )

Under guidance of

Dr. N. PRADHAN Mrs. RAJITHA K V andProfessor and Head & Mrs. HILDA MAYROSEDepartment of Psychopharmacology, Assistant Professors,NIMHANS, Department of BiomedicalBangalore. Engineering, MIT, Manipal.

Page 2: Shashank Ppt

Overview

• Objective ?To perform

• Segmentation?Subdividing an image in to its constituent object.

• Application like -Boundary detection of Acoustic neuroma.

Page 3: Shashank Ppt

Acoustic Neuroma

• Benign tumor arises from the Schwann cells of vestibular nerve.

• Causes ? Electromagnetic radiation from cellular phones

Mutation in NF2 chromosome

Page 4: Shashank Ppt

Continued.

• Diagnosis – Audiometric, MRI imaging.• Treatment – observation, microsurgical

removal.

Acoustic neuroma in the

right cranial nerve

Courtesy JLN hospital & Research centre

Page 5: Shashank Ppt

Classical Edge based image segmentation method

Page 6: Shashank Ppt

Problems with classical methods

• Not effective in presence of noise and artifacts.• Not deform into many different shapes of object boundary.• Manual and global operators.

To overcome these problems

ACTICE CONTOUR MODEL

Page 7: Shashank Ppt

Curve

• What is curve ?• Vector valued function.• Representation in Parametric form• A curve• s is a parameter arc length.

]1,0[)),(),(()( ssysxsX

X(s=.7)=(x(.7),y(.7))

S=0S=1y

x3

3

Page 8: Shashank Ppt

Why parametric curve?

• Parametric curve are much easier to draw.• Easy to sample the free parameter.• Commonly used in computer graphics.

Local properties of curve - continuity – defined by derivatives.

Page 9: Shashank Ppt

Derivatives of vector valued function• 1st derivative of vector valued function defines the

tangent vector at that point .• 2nd derivative of vector valued function defines normal

to the point of tangent vector.

Normal vector

curve

Tangent vector

Derivatives of vector valued function defines the shape of curve.A curve properties can be expressed using points in curve and tangent to that point.

Page 10: Shashank Ppt

Gradient descent method• Gradient ?• Optimization method.• To find local minimum.• Steps proportional to the negative of the gradient

of function at that point. Initialization of curve C1

1st step finds local minimum curve C2

Global minimum i.e. is final curve C4

Page 11: Shashank Ppt

Application of Gradient

• Gradient application to find extreme points.

Page 12: Shashank Ppt

Active contour model

• Active contour models are the deformable model that uses discontinuity-based segmentation method.

• The model moves within the boundaries of the desired object due to two types of driving forces.

• Internal forces (elasticity and bending of curve) are responsible to keep model smooth and continuous.

• External forces (of image edge, line, termination) to move the model toward an boundary.

Page 13: Shashank Ppt

Active contour model

• Active contour model are called SNAKES ?• Active contour model are deformable model?• Snakes deform to nearest salient feature i.e.

local minimum.• Seeks local minimum rather than global

solution.

Page 14: Shashank Ppt

Types and Formulation of Active contour model

Active contour MODEL

Geometric Active contour

model

PARAMETRIC Active contour

model

Parametric active contour model represent curves

explicitly in their parametric form during deformation

Formulation for parametric model

Energy minimization

Dynamic force

Page 15: Shashank Ppt

Energy minimization parametric active contour (EMPAC) model

• The energy minimization formulation used to compute the equilibrium configuration.

• Starting with non equilibrium geometry and ends with equilibrium geometry.

• Using Iterative gradient descent method.

Page 16: Shashank Ppt

EMPAC model (cont.)

• The properties and behavior of the EMPAC model is specified through a function called ‘energy function’

X(s) is a vector-valued function representing a contour and s is the arc length parameter. In order to produce a bounded line segment, the arc length parameter s takes values in the range of 0 to 1.

Page 17: Shashank Ppt

Internal energy

Internal energy basically sum of elastic and bending energy

•1st derivative of vector valued function, gives information of longitudinal contraction.•2nd derivative of vector valued function, gives information about curvature.• α and β are elastic and bending coefficient ,determines the extent to which contour is allowed to stretch or bend at that point.

Page 18: Shashank Ppt

Effect of alpha value on curve

Keeping alpha value less Keeping alpha value high

As the alpha value increases, longitudinal contraction increases and length of the curve decreases.

Page 19: Shashank Ppt

Effect of beta value on curve

Curve with beta value 0 . Curve with beta value high

As the beta value increases the sharp bending decreases, and the contour becomes smooth.

Page 20: Shashank Ppt

External energy

• Eext(x,y) external function derived from image

• Line functional is simply image function,

• The edge functional is defined by

termedgelineext EEEE

Page 21: Shashank Ppt

External energy (cont)

• Terminations are the endpoints of an edge. Junctions and terminations represent robust information.

• gx and gy are the first order derivatives of the image in x and y directions respectively.

• gxx and gyy are the second order derivative of image in x and y directions respectively.

• gx y is the second order derivative of image in direction.

Page 22: Shashank Ppt

Results after applying external energy function

MRI image Edges of image

Courtesy Jawaharlal Nehru research centre

Termination

Page 23: Shashank Ppt

Algorithm of EMPAC model

Input MRI image

Filter the image using Gaussian filter

Compute the external forces of smooth image by using gradient operator

Select the contour points near the desired solution

Compute the internal forces by creating pentagonal diagonal matrix

Move the model in the direction of negative gradient, using iterative gradient descent method.

Page 24: Shashank Ppt

Implementation in MATLAB

dsXEdss

X

s

Xext

1

02

221

0

)(||||2

1

t

X

X

E

s

X

s

X

)4

4()2

2(

Applying Euler Lagrange Equation

Energy forces converted to discrete form using finite difference equation using Pascal's triangle

X

E

s

XXXXX

s

XXX

t

XX tj

tj

tj

tj

tj

tj

tj

tj

tj

tj

4

12

11

111

12

2

11

111

1 4642

Page 25: Shashank Ppt

Equation implemented in MATLAB

Array of points in new position

Pentagonal diagonal cyclic matrix

Array of points in current position

Array of External energy function at current position

))](()[()( 11 text

tt XEtXMX

tj

t

t

t

t

t

t

t

t

t

t

X

Et

X

XX

X

X

X

XX

X

X

r

qp

p

q

q

r

p

q

p

p

q

pqrqp

pqrq

ppqr

1

2

2

1

0

11

12

12

11

10

*

Pentagonal cyclic matrix where r= 2α+6β, q=-

(α+4β), p=β, where α, β are responsible for

generating internal force

New position

of contour points

Current position of

contour points

Weighted External energy force of contour points

Page 26: Shashank Ppt

Algorithm descriptionInput MRI image

Smooth the image using Gaussian filter

compute the external forces of smoothed image-

Edge ,line, termination

Edge energy is negative square root of summation of gradient in x direction

and gradient in y direction .

Line energy is image intensity

Gradient of summation of edge energy and line energy

Termination energy calculated using image

derivatives.

Page 27: Shashank Ppt

Initialize the contour

Hold on the smooth image

Contour points are picked manually using mouse button

The coordinate values of picked point are placed in the matrix

1st column value and last column value are same to make the curve closed one

Interpolate curve with finer spacing

Page 28: Shashank Ppt

Generating pentagonal cyclic matrix(Internal forces)

Generate a matrix of dimension equal to number of columns x and y values .

Row is generated of ((2 *alpha+6*beta) , -(alpha +4*beta),beta , no. of zeros equal to 5-dimenstion of

generated matrix, beta, (alpha+4*beta) )

Generated matrix is made pentagonal cyclic matrix by circular shift the values of 1st row in 2nd row

Pentagonal diagonal matrix is generated that represent the internal forces

Inverse of pentagonal matrix using Lu factorization

Page 29: Shashank Ppt

Moving contour in each iteration External forces of contour points are

interpolated from the image external forces

The coordinate values of every contour point are subtracted from their respective weighted external

forces.

The new coordinate values of contour points are multiplied with the inverse pentagonal diagonal cyclic matrix to make the contour smooth

The contour is plotted on the image

The above steps are repeated for each of the iterations

Page 30: Shashank Ppt

Results

Page 31: Shashank Ppt

Results (cont)

Page 32: Shashank Ppt

Results (cont)

Page 33: Shashank Ppt

Results cont

Page 34: Shashank Ppt
Page 35: Shashank Ppt

More Results

Page 36: Shashank Ppt

FUTURE SCOPE

Page 37: Shashank Ppt

Discussions

• Parametric model wide range of applications, but still facing problem-

• Difficulty to deform into boundary concavity.• Difficulty dealing with splitting or merging

model parts.• The 2D EMPAC algorithm can be extended to

segment 3D volume image.

Page 38: Shashank Ppt

References• M. Kass, A. Witkin, D. Terzopoulos, “Snakes—active contour models”,

International Journal of Computer Vision 1 (4) (1987) 321– 331.• C. Xu, J.L. Prince, “Snakes, shapes, and gradient vector flow”, IEEE

Transactions on Image Processing 7 (3) (1998) 359–369• T. McInerney, D. Terzopoulos, Deformable models in medical image

analysis: A survey”, Medical Image Analysis, 1(2), 1996, Pages 91–108.• R.C. Gonzalez, R.E.Woods and S.L Eddins, “Digital Image Processing Using

MATLAB”, 2nd Edition, Gatesmark Publication, Knoxville, TN. 2009.• Demetri Terzopoulos, John Platt, Alan Barr and Kurt Fleischer, “Elastically

Deformable Models”, Computer Graphics, Volume 21, Number 4, July 1987.

• D.Terzopoulos and K.Fleischer, “Deformable models”, The Visual Computer Volume 4, Number 6, (1988), Page 306–331.

Page 39: Shashank Ppt

Thank you

Page 40: Shashank Ppt

Minimizing the energy functional

• .

0)()()(2

2

2

2

XEs

X

ss

X

s external

dsXEdss

X

s

Xext

1

02

221

0

)(||||2

1

Applying euler lagrange condition.

It can be viewed as force balance equation

0)()( XFXF EXTINT

Page 41: Shashank Ppt

DEFORMABLE MODEL IS MADE DYNAMIC

t

XXE

s

X

ss

X

s external

)()()(2

2

2

2

The model is made dynamic by treating X(s) as a function of time t as well as s.

When the solution finds equilibrium the left side vanishes and we get the solution

0)()()(2

2

2

2

XEs

X

ss

X

s external

Page 42: Shashank Ppt

Simplification

t

XXE

s

X

ss

X

s external

)()()(2

2

2

2

t

X

X

EXX

)()( ''''''

Page 43: Shashank Ppt

Flowchart Finding X(s) curve that minimizes

the energy functional

Must satisfy Euler Lagrange equation.

In sight of force balance equation.

Deformable model is made dynamic .

Solution stabilized and we achieve a solution .

Page 44: Shashank Ppt

Numerical implementation

• Finite difference method is used to implement deformable model.

• Finite difference method is efficient to compute.

.

Page 45: Shashank Ppt

Cont. numerical implementation

• By approximating the derivatives in

And converting into vector notation ),( tj

tj

tj yxX

t

X

X

E

s

X

s

X

)()(4

4

2

2

t

XX

X

E

s

XXXXX

s

XXX tj

tj

tj

tj

tj

tj

tj

tj

tj

tj

1

4

12

11

111

12

2

11

111 4642

Page 46: Shashank Ppt

Pascal's triangle

Page 47: Shashank Ppt

Derivative estimated using finite difference equation

4

12

11

111

12

4

4

2

11

111

2

2

1

464

2

s

XXXXX

s

X

s

XXX

s

X

t

XX

t

X

tj

tj

tj

tj

tj

tj

tj

tj

tj

tj

X

E

s

XXXXX

s

XXX

t

XX tj

tj

tj

tj

tj

tj

tj

tj

tj

tj

4

12

11

111

12

2

11

111

1 4642

Page 48: Shashank Ppt

Cont. numerical implementation

Converted to matrix form

)]([)( 11 text

tt XtEXMX

Solved by LU decomposition

X

E

s

XXXXX

s

XXX

t

XX tj

tj

tj

tj

tj

tj

tj

tj

tj

tj

4

12

11

111

12

2

11

111

1 4642

Interpolation

bp

baq

bar

4

621

PENTAGONAL CYCLIC DIAGONAL MATRIX

tj

t

t

t

t

t

t

t

t

t

t

X

Et

X

XX

X

X

X

XX

X

X

r

qp

p

q

q

r

p

q

p

p

q

pqrqp

pqrq

ppqr

1

2

2

1

0

11

12

12

11

10

*

Page 49: Shashank Ppt

Flowchart Approximate the derivatives using

finite difference equation

By converting it in to vector notation

Applying finite difference equation for each derivative

Convert it in to matrix form

Page 50: Shashank Ppt

Discretizing

• The contour X(s) set of control points.

• The curve is obtained by joining control point.

• Force equations applied to each control point separately.

• Each control point allowed to move freely under the. influence of the forces.

• The energy and force terms are converted to discrete form.