SlideShare a Scribd company logo
1 of 19
Electrical &Computer
Engineering Department

University of Houston

Snakes in Images
Yan Xu

Bio-Image Analytics Laboratory
How snake works in images

http://www.iacl.ece.jhu.edu/~chenyang/research/levset/movie/index.html
How snake works in images
 Step 1: Model the shape by curve or surface
 Step 2: Define the energy function E along the curve
E = internal energy (curvature) + external energy (images)
 Step 3: Derive the curve to minimize the energy (calculus
of variations)
 Step 4: Propagate the curves (gradient descent) to reach
the minimum using level set (easier to implement in reality).

Keywords:
Curve

Energy

Level set
Snake -> Curves
Consider a closed planar curve C ( p) {x( p), y( p)}, p [0,1]
C(0.1)

S(p) is the arclength

C(0.2)

C(0.7)
C(0)

C(0.4)
C(0.95)

Cp =tangent
C(0.8)

Css

| Cp |

Css

N

N
1

C(0.9)

Cs

Cp

C

The geometric trace of the curve can be alternatively
represented implicitly as C {( x, y ) | ( x, y ) 0}
1
0
0

1
Properties of level sets

T

The level set normal

N

|


N

|

Proof. Along the level sets (equal 0) we have zero change,
that is s 0 , but by the chain rule
So,

s

|

( x, y )

|


,T

x

0

xs

|

y

|


,T

ys

T


N

|

|
Properties of Level Sets
The level set curvature
Css =div

|

|

Proof. zero change along the level sets,
ss

So,

( x, y )

d
( x xs
ds
,

|

|

y

|

ys )
|

[


,T

d
ds
x

xx s

xy

ys ,

ss


,T

d
ds
x

xy s

yy

ys ],

|

0 , also


, N

|

Numerical Geometry of Images:
http://webcourse.cs.technion.ac.il/236861/Winter2012-2013/en/ho_Tutorials.html
Constant Flow

Ct



N

Propagation of Curves

Change in topology

Curvature Flow

Ct

Grayson



N
Vanish at a
Circular
point

First becomes
convex

Gage-Hamilton
Curve propagation in Level Sets
dC
dt



VN

C(t)

d
dt

y

V

x

x, y, t

( x, y; t )
t

0

t


N

x

xt

y

yt

x xt

|

t

C(t) level set


, VN

, Ct

V

|

y

y yt


,N


,N

V

V

0

,

|

x

|

V|

|
Curve propagation in Level Sets
 Handles changes in topology
 Numeric grid points never collide
or drift apart.

Parametric Curve -> Level set in plane -> add time axis for propagation
Curve propagation in Level Sets
Some flows

Ct


VN

Ct


N

Ct

g

t

t

 
g, N N

V
2
xx y

div

t

2

xy x y
2
2
x
y

2
yy x

div g
g

2
xx y

2

xy x y
2
2
x
y

2
yy x

g,
Snake Model
1

arg min
C

Cp
0

2

C pp

tension

2

rigidity

2 g (C ) dp
external energy from the image

Energy

g (C )

|

[G (C ) * I (C )] |2

A snake that minimize E must satisfy the Euler equation

Cpp

Cpppp

g C

0

To find a solution

dC
dt

C pp

C pppp

g C

When C stabilizes and the term Ct vanishes, a solution is achieved.
Snakes: Active Contour Models, 1988
Geodesic Active Contour
arg min
C

L C
0

g C ds

ds is the Euclidean arc-length.

Trying to find minimum weighted distance

I(x)

Euler Lagrange gradient descent

Ct


g (C) n

 
g (C), n n

x
g(x)

d
dt

div g x, y

Geodesic Active Contours, 1997

x
GVF Snakes
Replace the external force with gradient vector flow (GVF) force v.

dC
dt

C pp

C pppp

g C

V(x,y) = [u(x,y),v(x,y)]
Why?
f generally have large magnitudes only in the vicinity of the edges, the
capture range would be small.
It’s nearly zero in homogeneous regions.
V(x,y) = [u(x,y), v(x,y)] is defined as the vector field that minimizes
the energy functional:

http://www.iacl.ece.jhu.edu/static/gvf/
GVF Snake Results
Original Snake Model

2d GVF vector field

GVF Snake Model
itk Implementation for
GVF Geodesic Active Contour
Original Image

Gradient Magnitude

Gradient

Initial Contour

Sigmoid
Rescaling

Geodesic
Active
Contour

Gradient
Vector Flow
Thresholding

Insight Segmentation and Registration Toolkit (ITK)
itk Implementation for
GVF Geodesic Active Contour
gvfFilter->Update();
GeoAC->SetInput(initialContour->GetOutput());
GeoAC->SetAutoGenerateSpeedAdvection(false);
GeoAC->SetFeatureImage(sigmoid->GetOutput());
GeoAC->GenerateSpeedImage();
GeoAC->SetAdvectionImage(gvfFilter->GetOutput());
Recommended:
Numerical Geometry of Images:
http://webcourse.cs.technion.ac.il/236861/Winter2012-2013/en/ho_Tutorials.html
Calculus of Variations
Generalization of Calculus that seeks to find the
path, curve, surface, etc., for which a given Functional has
a minimum or maximum.
Goal: find extrema values of integrals of the form

F (u, u x )dx
It has an extremum only if the Euler-Lagrange
Differential Equation is satisfied,

u

d
F ( u, u x )
dx u x

0
Calculus of Variations
Example: Find the shape of the curve {x,y(x)} with
shortest length:
x1
y ( x1 )
2
1 y x dx ,
y ( x0 )
x0
given y(x0),y(x1)

x0
Solution: a differential equation that y(x) must
satisfy,
y xx
0
yx a
y ( x ) ax b
3/ 2
2
1 yx

x1

More Related Content

What's hot

Introduction to computer graphics
Introduction to computer graphicsIntroduction to computer graphics
Introduction to computer graphics
Partnered Health
 

What's hot (20)

2d-transformation
2d-transformation2d-transformation
2d-transformation
 
Matrix representation- CG.pptx
Matrix representation- CG.pptxMatrix representation- CG.pptx
Matrix representation- CG.pptx
 
Fourier descriptors & moments
Fourier descriptors & momentsFourier descriptors & moments
Fourier descriptors & moments
 
illumination model in Computer Graphics by irru pychukar
illumination model in Computer Graphics by irru pychukarillumination model in Computer Graphics by irru pychukar
illumination model in Computer Graphics by irru pychukar
 
Morphological image processing
Morphological image processingMorphological image processing
Morphological image processing
 
Lect 02 second portion
Lect 02  second portionLect 02  second portion
Lect 02 second portion
 
Fundamental steps in image processing
Fundamental steps in image processingFundamental steps in image processing
Fundamental steps in image processing
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Depth Buffer Method
Depth Buffer MethodDepth Buffer Method
Depth Buffer Method
 
4. THREE DIMENSIONAL DISPLAY METHODS
4.	THREE DIMENSIONAL DISPLAY METHODS4.	THREE DIMENSIONAL DISPLAY METHODS
4. THREE DIMENSIONAL DISPLAY METHODS
 
Random scan displays and raster scan displays
Random scan displays and raster scan displaysRandom scan displays and raster scan displays
Random scan displays and raster scan displays
 
Introduction to computer graphics
Introduction to computer graphicsIntroduction to computer graphics
Introduction to computer graphics
 
Texture mapping
Texture mapping Texture mapping
Texture mapping
 
Computer Vision - cameras
Computer Vision - camerasComputer Vision - cameras
Computer Vision - cameras
 
line attributes.pptx
line attributes.pptxline attributes.pptx
line attributes.pptx
 
Dda line algorithm presentatiion
Dda line algorithm presentatiionDda line algorithm presentatiion
Dda line algorithm presentatiion
 
Presentation on deformable model for medical image segmentation
Presentation on deformable model for medical image segmentationPresentation on deformable model for medical image segmentation
Presentation on deformable model for medical image segmentation
 
Object representations
Object representationsObject representations
Object representations
 
Unit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdfUnit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdf
 
Curves and surfaces
Curves and surfacesCurves and surfaces
Curves and surfaces
 

Viewers also liked

Image segmentation ppt
Image segmentation pptImage segmentation ppt
Image segmentation ppt
Gichelle Amon
 
Image Segmentation
Image SegmentationImage Segmentation
Image Segmentation
ashek1520
 
Meanshift Tracking Presentation
Meanshift Tracking PresentationMeanshift Tracking Presentation
Meanshift Tracking Presentation
sandtouch
 
Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...
Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...
Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...
Habibur Rahman
 
various methods for image segmentation
various methods for image segmentationvarious methods for image segmentation
various methods for image segmentation
Raveesh Methi
 
36324442 biosignal-and-bio-medical-image-processing-matlab-based-applications...
36324442 biosignal-and-bio-medical-image-processing-matlab-based-applications...36324442 biosignal-and-bio-medical-image-processing-matlab-based-applications...
36324442 biosignal-and-bio-medical-image-processing-matlab-based-applications...
Avinash Nandakumar
 
Evaluation question 6..
Evaluation question 6..Evaluation question 6..
Evaluation question 6..
Georgii_Kelly
 

Viewers also liked (20)

Active contour segmentation
Active contour segmentationActive contour segmentation
Active contour segmentation
 
Dip Image Segmentation
Dip Image SegmentationDip Image Segmentation
Dip Image Segmentation
 
Image segmentation ppt
Image segmentation pptImage segmentation ppt
Image segmentation ppt
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
 
Mesh Processing Course : Active Contours
Mesh Processing Course : Active ContoursMesh Processing Course : Active Contours
Mesh Processing Course : Active Contours
 
CVIM mean shift-3
CVIM mean shift-3CVIM mean shift-3
CVIM mean shift-3
 
Chapter1 4.6
Chapter1 4.6Chapter1 4.6
Chapter1 4.6
 
Image Segmentation
Image SegmentationImage Segmentation
Image Segmentation
 
Meanshift Tracking Presentation
Meanshift Tracking PresentationMeanshift Tracking Presentation
Meanshift Tracking Presentation
 
Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...
Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...
Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...
 
various methods for image segmentation
various methods for image segmentationvarious methods for image segmentation
various methods for image segmentation
 
Image Processing Using MATLAB
Image Processing Using MATLABImage Processing Using MATLAB
Image Processing Using MATLAB
 
A version of watershed algorithm for color image segmentation
A version of watershed algorithm for color image segmentationA version of watershed algorithm for color image segmentation
A version of watershed algorithm for color image segmentation
 
36324442 biosignal-and-bio-medical-image-processing-matlab-based-applications...
36324442 biosignal-and-bio-medical-image-processing-matlab-based-applications...36324442 biosignal-and-bio-medical-image-processing-matlab-based-applications...
36324442 biosignal-and-bio-medical-image-processing-matlab-based-applications...
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Microscopic Digital Image Segmentation And feature Extraction of Acute Leukemia
Microscopic Digital Image Segmentation And feature Extraction of Acute LeukemiaMicroscopic Digital Image Segmentation And feature Extraction of Acute Leukemia
Microscopic Digital Image Segmentation And feature Extraction of Acute Leukemia
 
Water conservation
Water conservationWater conservation
Water conservation
 
Unidad 5.
Unidad 5.Unidad 5.
Unidad 5.
 
โทรศัพท์และสัญญาณ
โทรศัพท์และสัญญาณโทรศัพท์และสัญญาณ
โทรศัพท์และสัญญาณ
 
Evaluation question 6..
Evaluation question 6..Evaluation question 6..
Evaluation question 6..
 

Similar to Snakes in Images (Active contour tutorial)

sublabel accurate convex relaxation of vectorial multilabel energies
sublabel accurate convex relaxation of vectorial multilabel energiessublabel accurate convex relaxation of vectorial multilabel energies
sublabel accurate convex relaxation of vectorial multilabel energies
Fujimoto Keisuke
 
TAO Fayan_X-Ray and MIP volume rendering
TAO Fayan_X-Ray and MIP volume renderingTAO Fayan_X-Ray and MIP volume rendering
TAO Fayan_X-Ray and MIP volume rendering
Fayan TAO
 
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docxSAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
anhlodge
 
QMC: Transition Workshop - Applying Quasi-Monte Carlo Methods to a Stochastic...
QMC: Transition Workshop - Applying Quasi-Monte Carlo Methods to a Stochastic...QMC: Transition Workshop - Applying Quasi-Monte Carlo Methods to a Stochastic...
QMC: Transition Workshop - Applying Quasi-Monte Carlo Methods to a Stochastic...
The Statistical and Applied Mathematical Sciences Institute
 

Similar to Snakes in Images (Active contour tutorial) (20)

On approximating the Riemannian 1-center
On approximating the Riemannian 1-centerOn approximating the Riemannian 1-center
On approximating the Riemannian 1-center
 
ALEXANDER FRACTIONAL INTEGRAL FILTERING OF WAVELET COEFFICIENTS FOR IMAGE DEN...
ALEXANDER FRACTIONAL INTEGRAL FILTERING OF WAVELET COEFFICIENTS FOR IMAGE DEN...ALEXANDER FRACTIONAL INTEGRAL FILTERING OF WAVELET COEFFICIENTS FOR IMAGE DEN...
ALEXANDER FRACTIONAL INTEGRAL FILTERING OF WAVELET COEFFICIENTS FOR IMAGE DEN...
 
sublabel accurate convex relaxation of vectorial multilabel energies
sublabel accurate convex relaxation of vectorial multilabel energiessublabel accurate convex relaxation of vectorial multilabel energies
sublabel accurate convex relaxation of vectorial multilabel energies
 
TAO Fayan_X-Ray and MIP volume rendering
TAO Fayan_X-Ray and MIP volume renderingTAO Fayan_X-Ray and MIP volume rendering
TAO Fayan_X-Ray and MIP volume rendering
 
Iterative methods with special structures
Iterative methods with special structuresIterative methods with special structures
Iterative methods with special structures
 
Fast Object Recognition from 3D Depth Data with Extreme Learning Machine
Fast Object Recognition from 3D Depth Data with Extreme Learning MachineFast Object Recognition from 3D Depth Data with Extreme Learning Machine
Fast Object Recognition from 3D Depth Data with Extreme Learning Machine
 
Divergence clustering
Divergence clusteringDivergence clustering
Divergence clustering
 
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docxSAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
 
QMC: Transition Workshop - Applying Quasi-Monte Carlo Methods to a Stochastic...
QMC: Transition Workshop - Applying Quasi-Monte Carlo Methods to a Stochastic...QMC: Transition Workshop - Applying Quasi-Monte Carlo Methods to a Stochastic...
QMC: Transition Workshop - Applying Quasi-Monte Carlo Methods to a Stochastic...
 
Fir 05 dynamics
Fir 05 dynamicsFir 05 dynamics
Fir 05 dynamics
 
cswiercz-general-presentation
cswiercz-general-presentationcswiercz-general-presentation
cswiercz-general-presentation
 
How to design a linear control system
How to design a linear control systemHow to design a linear control system
How to design a linear control system
 
Computing the masses of hyperons and charmed baryons from Lattice QCD
Computing the masses of hyperons and charmed baryons from Lattice QCDComputing the masses of hyperons and charmed baryons from Lattice QCD
Computing the masses of hyperons and charmed baryons from Lattice QCD
 
ABC-Gibbs
ABC-GibbsABC-Gibbs
ABC-Gibbs
 
Trilinear embedding for divergence-form operators
Trilinear embedding for divergence-form operatorsTrilinear embedding for divergence-form operators
Trilinear embedding for divergence-form operators
 
Ch06 ssm
Ch06 ssmCh06 ssm
Ch06 ssm
 
Capitulo 4, 7ma edición
Capitulo 4, 7ma ediciónCapitulo 4, 7ma edición
Capitulo 4, 7ma edición
 
QMC: Transition Workshop - Density Estimation by Randomized Quasi-Monte Carlo...
QMC: Transition Workshop - Density Estimation by Randomized Quasi-Monte Carlo...QMC: Transition Workshop - Density Estimation by Randomized Quasi-Monte Carlo...
QMC: Transition Workshop - Density Estimation by Randomized Quasi-Monte Carlo...
 
Skewed plate problem
Skewed plate problemSkewed plate problem
Skewed plate problem
 
Robust Image Denoising in RKHS via Orthogonal Matching Pursuit
Robust Image Denoising in RKHS via Orthogonal Matching PursuitRobust Image Denoising in RKHS via Orthogonal Matching Pursuit
Robust Image Denoising in RKHS via Orthogonal Matching Pursuit
 

More from Yan Xu

More from Yan Xu (20)

Kaggle winning solutions: Retail Sales Forecasting
Kaggle winning solutions: Retail Sales ForecastingKaggle winning solutions: Retail Sales Forecasting
Kaggle winning solutions: Retail Sales Forecasting
 
Basics of Dynamic programming
Basics of Dynamic programming Basics of Dynamic programming
Basics of Dynamic programming
 
Walking through Tensorflow 2.0
Walking through Tensorflow 2.0Walking through Tensorflow 2.0
Walking through Tensorflow 2.0
 
Practical contextual bandits for business
Practical contextual bandits for businessPractical contextual bandits for business
Practical contextual bandits for business
 
Introduction to Multi-armed Bandits
Introduction to Multi-armed BanditsIntroduction to Multi-armed Bandits
Introduction to Multi-armed Bandits
 
A Data-Driven Question Generation Model for Educational Content - by Jack Wang
A Data-Driven Question Generation Model for Educational Content - by Jack WangA Data-Driven Question Generation Model for Educational Content - by Jack Wang
A Data-Driven Question Generation Model for Educational Content - by Jack Wang
 
Deep Learning Approach in Characterizing Salt Body on Seismic Images - by Zhe...
Deep Learning Approach in Characterizing Salt Body on Seismic Images - by Zhe...Deep Learning Approach in Characterizing Salt Body on Seismic Images - by Zhe...
Deep Learning Approach in Characterizing Salt Body on Seismic Images - by Zhe...
 
Deep Hierarchical Profiling & Pattern Discovery: Application to Whole Brain R...
Deep Hierarchical Profiling & Pattern Discovery: Application to Whole Brain R...Deep Hierarchical Profiling & Pattern Discovery: Application to Whole Brain R...
Deep Hierarchical Profiling & Pattern Discovery: Application to Whole Brain R...
 
Detecting anomalies on rotating equipment using Deep Stacked Autoencoders - b...
Detecting anomalies on rotating equipment using Deep Stacked Autoencoders - b...Detecting anomalies on rotating equipment using Deep Stacked Autoencoders - b...
Detecting anomalies on rotating equipment using Deep Stacked Autoencoders - b...
 
Introduction to Autoencoders
Introduction to AutoencodersIntroduction to Autoencoders
Introduction to Autoencoders
 
State of enterprise data science
State of enterprise data scienceState of enterprise data science
State of enterprise data science
 
Long Short Term Memory
Long Short Term MemoryLong Short Term Memory
Long Short Term Memory
 
Deep Feed Forward Neural Networks and Regularization
Deep Feed Forward Neural Networks and RegularizationDeep Feed Forward Neural Networks and Regularization
Deep Feed Forward Neural Networks and Regularization
 
Linear algebra and probability (Deep Learning chapter 2&3)
Linear algebra and probability (Deep Learning chapter 2&3)Linear algebra and probability (Deep Learning chapter 2&3)
Linear algebra and probability (Deep Learning chapter 2&3)
 
HML: Historical View and Trends of Deep Learning
HML: Historical View and Trends of Deep LearningHML: Historical View and Trends of Deep Learning
HML: Historical View and Trends of Deep Learning
 
Secrets behind AlphaGo
Secrets behind AlphaGoSecrets behind AlphaGo
Secrets behind AlphaGo
 
Optimization in Deep Learning
Optimization in Deep LearningOptimization in Deep Learning
Optimization in Deep Learning
 
Introduction to Recurrent Neural Network
Introduction to Recurrent Neural NetworkIntroduction to Recurrent Neural Network
Introduction to Recurrent Neural Network
 
Convolutional neural network
Convolutional neural network Convolutional neural network
Convolutional neural network
 
Introduction to Neural Network
Introduction to Neural NetworkIntroduction to Neural Network
Introduction to Neural Network
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Snakes in Images (Active contour tutorial)

  • 1. Electrical &Computer Engineering Department University of Houston Snakes in Images Yan Xu Bio-Image Analytics Laboratory
  • 2. How snake works in images http://www.iacl.ece.jhu.edu/~chenyang/research/levset/movie/index.html
  • 3. How snake works in images  Step 1: Model the shape by curve or surface  Step 2: Define the energy function E along the curve E = internal energy (curvature) + external energy (images)  Step 3: Derive the curve to minimize the energy (calculus of variations)  Step 4: Propagate the curves (gradient descent) to reach the minimum using level set (easier to implement in reality). Keywords: Curve Energy Level set
  • 4. Snake -> Curves Consider a closed planar curve C ( p) {x( p), y( p)}, p [0,1] C(0.1) S(p) is the arclength C(0.2) C(0.7) C(0) C(0.4) C(0.95) Cp =tangent C(0.8) Css | Cp | Css N N 1 C(0.9) Cs Cp C The geometric trace of the curve can be alternatively represented implicitly as C {( x, y ) | ( x, y ) 0} 1 0 0 1
  • 5. Properties of level sets  T The level set normal  N |  N | Proof. Along the level sets (equal 0) we have zero change, that is s 0 , but by the chain rule So, s | ( x, y ) |  ,T x 0 xs | y |  ,T ys  T  N | |
  • 6. Properties of Level Sets The level set curvature Css =div | | Proof. zero change along the level sets, ss So, ( x, y ) d ( x xs ds , | | y | ys ) | [  ,T d ds x xx s xy ys , ss  ,T d ds x xy s yy ys ], | 0 , also  , N | Numerical Geometry of Images: http://webcourse.cs.technion.ac.il/236861/Winter2012-2013/en/ho_Tutorials.html
  • 7. Constant Flow Ct   N Propagation of Curves Change in topology Curvature Flow Ct Grayson   N Vanish at a Circular point First becomes convex Gage-Hamilton
  • 8. Curve propagation in Level Sets dC dt   VN C(t) d dt y V x x, y, t ( x, y; t ) t 0 t  N x xt y yt x xt | t C(t) level set  , VN , Ct V | y y yt  ,N  ,N V V 0 , | x | V| |
  • 9. Curve propagation in Level Sets  Handles changes in topology  Numeric grid points never collide or drift apart. Parametric Curve -> Level set in plane -> add time axis for propagation
  • 10. Curve propagation in Level Sets Some flows Ct  VN Ct  N Ct g t t   g, N N V 2 xx y div t 2 xy x y 2 2 x y 2 yy x div g g 2 xx y 2 xy x y 2 2 x y 2 yy x g,
  • 11. Snake Model 1 arg min C Cp 0 2 C pp tension 2 rigidity 2 g (C ) dp external energy from the image Energy g (C ) | [G (C ) * I (C )] |2 A snake that minimize E must satisfy the Euler equation Cpp Cpppp g C 0 To find a solution dC dt C pp C pppp g C When C stabilizes and the term Ct vanishes, a solution is achieved. Snakes: Active Contour Models, 1988
  • 12. Geodesic Active Contour arg min C L C 0 g C ds ds is the Euclidean arc-length. Trying to find minimum weighted distance I(x) Euler Lagrange gradient descent Ct  g (C) n   g (C), n n x g(x) d dt div g x, y Geodesic Active Contours, 1997 x
  • 13. GVF Snakes Replace the external force with gradient vector flow (GVF) force v. dC dt C pp C pppp g C V(x,y) = [u(x,y),v(x,y)] Why? f generally have large magnitudes only in the vicinity of the edges, the capture range would be small. It’s nearly zero in homogeneous regions. V(x,y) = [u(x,y), v(x,y)] is defined as the vector field that minimizes the energy functional: http://www.iacl.ece.jhu.edu/static/gvf/
  • 14. GVF Snake Results Original Snake Model 2d GVF vector field GVF Snake Model
  • 15. itk Implementation for GVF Geodesic Active Contour Original Image Gradient Magnitude Gradient Initial Contour Sigmoid Rescaling Geodesic Active Contour Gradient Vector Flow Thresholding Insight Segmentation and Registration Toolkit (ITK)
  • 16. itk Implementation for GVF Geodesic Active Contour gvfFilter->Update(); GeoAC->SetInput(initialContour->GetOutput()); GeoAC->SetAutoGenerateSpeedAdvection(false); GeoAC->SetFeatureImage(sigmoid->GetOutput()); GeoAC->GenerateSpeedImage(); GeoAC->SetAdvectionImage(gvfFilter->GetOutput());
  • 17. Recommended: Numerical Geometry of Images: http://webcourse.cs.technion.ac.il/236861/Winter2012-2013/en/ho_Tutorials.html
  • 18. Calculus of Variations Generalization of Calculus that seeks to find the path, curve, surface, etc., for which a given Functional has a minimum or maximum. Goal: find extrema values of integrals of the form F (u, u x )dx It has an extremum only if the Euler-Lagrange Differential Equation is satisfied, u d F ( u, u x ) dx u x 0
  • 19. Calculus of Variations Example: Find the shape of the curve {x,y(x)} with shortest length: x1 y ( x1 ) 2 1 y x dx , y ( x0 ) x0 given y(x0),y(x1) x0 Solution: a differential equation that y(x) must satisfy, y xx 0 yx a y ( x ) ax b 3/ 2 2 1 yx x1