Active Contours - SNAKES - PowerPoint PPT Presentation

Active contours snakes l.jpg
1 / 36

  • Updated On :
  • Presentation posted in: Pets / Animals

CSci 8810 Image Processing. Active Contours - SNAKES. Meghana Viswanath March 19, 2009. Object Recognition… How?. Edge detectors. Works well for some images. Not so much for others. Too many spurious edges Linking edges belonging to the same object is difficult. Active Contours or Snakes.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

Download Presentation

Active Contours - SNAKES

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Active contours snakes l.jpg

CSci 8810 Image Processing

Active Contours - SNAKES

Meghana Viswanath

March 19, 2009

Object recognition how l.jpg

Object Recognition… How?

  • Edge detectors

Works well for some images

Not so much for others l.jpg

Not so much for others

  • Too many spurious edges

  • Linking edges belonging to the same object is difficult

Active contours or snakes l.jpg

Active Contours or Snakes

  • Results from the work of Kass in 1987

  • Snakes are shapes or curves that transform themselves to take the shape of an object in an image.

  • Snakes are energy minimizing splines

Aorta segmentation using snakes l.jpg

Aorta Segmentation using snakes

Snake behavior l.jpg

Snake Behavior

  • An initial curve/snake is defined near the object

  • The curve is iteratively refined to form the least energy contour

  • Snakes operate locally, thus one must provide an initial position for them

Snake initialization l.jpg

Snake Initialization

Snake representation l.jpg

Snake Representation

  • A snake is a contour in the image plane, defined by a set of ncontrol points.

    vi = (xi, yi), i = 0, .... n-1

Energy minimization l.jpg

Energy Minimization





object boundary

Find the local minimum and move towards it.

Snake energy l.jpg

Snake Energy

The snake - v(s) = [x(s), y(s)], is defined as a function of a real variable s ϵ [0,1]

The energy of the snake is given by -

Esnake = 0∫1 (Eint + Eext)ds

Internal energy l.jpg

Internal Energy

  • Internal energy describes the manner in which the snake moves

  • It can be written as -

    Eint = (α (v’)2 + β (v”)2)

  • α, β specify the amount of elasticity and stiffness of the snake, respectively

Internal energy12 l.jpg

Internal Energy

  • First Term : α (v’)2

  • If you want the snake to shrink, then make Eint directly proportional to snake length

  • Instead,

    Eint = Σα (distance b/w control pt. and left neighbour)2

  • This makes the control points to spread out evenly

Internal energy13 l.jpg

Internal Energy

  • Second Term : β (v”)2

  • If you want the snake to be smooth, then make Eint directly proportional to the curvature

  • Instead, Eint = Σβ (curvature at control point)2

  • This makes the control points to move as a smooth curve

Internal energy14 l.jpg

Internal Energy

  • A large positive value of α and/or β means that stretching(elasticity) and/or bending(smoothness) are tightly constrained as we search for an energy minimum

  • Making β = 0 i.e. second order discontinuous, makes the snake develop a corner (least stiff)

External energy l.jpg

External Energy

  • External energy pulls the snake towards desirable features such as edges

  • Tells the snake where to stop

  • It is derived from the image

  • External energy – negative gradient

    Eext = -|∇I(x,y)|2

External energy16 l.jpg

For a gray-scale image I(x,y),

Eext = -|∇ I(x,y)|2

Eext = -|∇ (Gσ(x,y) * I(x,y))|2

For a binary image

Eext = I(x,y)

Eext = Gσ(x,y) * I(x,y)

External Energy

Euler equation l.jpg

Euler Equation

  • A snake that minimizes E must satisfy the Euler equation –

    α v”(s)- β v””(s) -∇Eext = 0

Force balance equation l.jpg

Force Balance Equation

Minimizing energy equation can be interpreted as a force balance equation

Fint + Fext = 0


Fint = α v” - β v””


Fext = −∇ Eext

The internal force Fint discourages stretching and bending while the external potential force Fext pulls the snake toward the desired image edges

Problems with traditional snakes l.jpg

Problems with traditional snakes

  • Low capture range

    • Initial snake position should be close to the object boundary

    • Reason - External force field is non-existent in uniform regions

  • Unable to move into boundary concavities

    • Reason – External force vectors are normal to the object boundary

Traditional snakes l.jpg

Traditional Snakes









  • Convergence of the snake

  • External Force Field

  • Close-up of the force field within the boundary concavity

Gradient vector flow gvf snakes l.jpg

Gradient Vector Flow (GVF) snakes

Both problems with traditional snakes are related to external force field.

Xu and Prince formulate a new type of static external force called Gradient Vector Flow.

Fext = v

Edge map l.jpg

Edge Map

  • For any gray-scale or binary image, let the edge map be defined such that it has large values near edges.

    Eg.Eext =-|∇ I(x,y)|2

  • Properties of edge maps

    • Gradient vectors point toward and are normal to the edges

    • Gradients are large only in the immediate neighborhood of edges

    • In homogeneous regions, gradient is almost zero

How edge map properties affect traditional snake behavior l.jpg

How edge map properties affect traditional snake behavior

  • Gradient vectors point toward and are normal to the edges

    => a snake initialized close to the edge will converge to a stable configuration near the edge

  • Gradients are large only in the immediate neighborhood of edges

    => small capture range

  • In homogeneous regions, gradient is almost zero

    => homogeneous regions will have no external forces

Gvf approach l.jpg

GVF Approach

  • Retain the highly desirable property of the gradients near the edges

  • But extend the gradient map farther away from the edges and into homogeneous regions using a computational diffusion process.

  • As an important benefit, the inherent competition of the diffusion process will also create vectors that point into boundary concavities.

Gvf energy functional l.jpg

GVF energy functional

  • We define the gradient vector flow field to be the vector fieldv(x,y)=(u(x,y),v(x,y)) that minimizes the energy functional

    Ɛ = ∫ ∫ Ч(ux2+uy2+vx2+vy2)+|∇ f |2|v-∇ f |2dxdy

    • When ∇ f is low, the first term dominates yielding a slowly varying field

    • When ∇ f is high, the second term dominates and is minimized by setting v =∇ f.

Gvf euler equations l.jpg

GVF Euler equations

  • It can be shown that the GVF field can be found by solving the following Euler equations –

  • In homogeneous regions, second term = 0

  • u and v are determined only by the Laplace equation

  • v is determined from the region’s boundary

  • a kind if competition among boundary vectors

    Therefore, GVF snakes can move into boundary concavities

Gvf snakes l.jpg

GVF Snakes




  • Convergence of the snake

  • External Force Field

  • Close-up of the force field within the boundary concavity

Subjective contours l.jpg

Subjective Contours

Applications l.jpg


  • Motion Tracking

  • Speech Analysis

  • Traffic monitoring

  • Surveillance

  • Actor-driven facial animation

  • Gait Analysis

Speech analysis l.jpg

Speech Analysis

Traffic monitoring l.jpg

Traffic Monitoring

By automatically tracking cars, the emergency services could obtain rapid warning of an accident or traffic jam.

Surveillance l.jpg


A computer vision system follows an intruder on a security camera

Actor driven facial animation l.jpg

Actor-driven facial animation

Tracked facial motions drive input channels to a cartoon cat, programmed with some exaggeration of expression

Motion tracking l.jpg

Motion Tracking

Tracking the articulated motion of a human body is applicable both to biometrics and clinical gait analysis and for actor-driven whole body animation

References l.jpg


Books -

  • Computer Vision – L. Shapiro and G. Stockman

  • Active Contours – Blake and Isard

    Technical papers -

  • Snakes: Active contour models - M. Kass, A. Witkin and D. Terzopoulos.

  • Snakes, Shapes, and Gradient Vector Flow - Chenyang Xu and Jerry L. Prince

Questions l.jpg


  • Login