aula 09. deformable contours

Upload: carolina-beaklini

Post on 04-Jun-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Aula 09. Deformable Contours

    1/17

    Deformable Contours

    Raul Queiroz FeitosaGilson A. O. P. Costa

  • 8/13/2019 Aula 09. Deformable Contours

    2/17

  • 8/13/2019 Aula 09. Deformable Contours

    3/17

    Content

    Introduction

    The Energy Functional

    A Greedy Algorithm

    11/14/2013 Deformable Contours 3

  • 8/13/2019 Aula 09. Deformable Contours

    4/17

    14/11/2013 Deformable Contours 4

    Introduction

    The problem consists of fitting a curve of arbitraryshape to a set of image edge points.

    Thesnake (active contour)is a kind of elastic

    band of arbitrary shape that is attracted towards the

    target contour.

    An energy functionalmodels the forces acting uponthe snake, searching the condition of minimum

    energy.

  • 8/13/2019 Aula 09. Deformable Contours

    5/17

    14/11/2013 Deformable Contours 5

    Introduction

  • 8/13/2019 Aula 09. Deformable Contours

    6/17

    Content

    Introduction

    The Energy Functional

    A Greedy Algorithm

    11/14/2013 Deformable Contours 6

  • 8/13/2019 Aula 09. Deformable Contours

    7/17

  • 8/13/2019 Aula 09. Deformable Contours

    8/17

    14/11/2013 Deformable Contours 8

    Elements of Energy Functional

    Continuity Term

    Forces the edge points to be equally spaced.

    For a chain ofN adjacent image points p1,, pN

    Econt= (d - | pi- pi-1|)2

    where dis the average distance between pairs (pi

    , pi-1

    ).

  • 8/13/2019 Aula 09. Deformable Contours

    9/17

    14/11/2013 Deformable Contours 9

    Elements of Energy Functional

    Edge Attraction Term

    Moves the contour toward edges, i.e. where the

    magnitude of the gradient is high. Thus

    Eimage= - | I|

    where I is the image and Ithe magnitude of gradient.

  • 8/13/2019 Aula 09. Deformable Contours

    10/17

    14/11/2013 Deformable Contours 10

    Elements of Energy Functional

    Smoothness Term

    Avoids oscillations of the deformable contour

    Penalizes high contour curvatures

    Ecurv= | (pi+1- pi) - (pi- pi-1) |2

    Ecurv= | pi-1-2pi+ pi+1|2

  • 8/13/2019 Aula 09. Deformable Contours

    11/17

    Content

    Introduction

    The Energy Functional

    A Greedy Algorithm

    11/14/2013 Deformable Contours 11

  • 8/13/2019 Aula 09. Deformable Contours

    12/17

    14/11/2013 Deformable Contours 12

    A Greedy Algorithm

    Problem Statement

    Starting from p1,,pN find the deformable contour p1,,pNwhich fits the target image contour best, by minimizing the

    energy functional

    with i,i,i 0 andEcont,EcurvandEimagedefined as

    before.

    N

    i

    imageicurviconti EEE1

  • 8/13/2019 Aula 09. Deformable Contours

    13/17

    14/11/2013 Deformable Contours 13

    A Greedy Algorithm

    Steps1. Minimization:compare the energy functional values at each

    location in a (typically small) neighborhood around each edge.

    2. Corner Elimination:If a curvature maximum is found at point

    pj, jis set to zero. This will allow that corner to exist.3. Normalization:the termsEcontandEcurvare divided by the

    largest value in the neighborhood. ForEimagethe gradient is to benormalized as

    whereM and m are the maximum and minimum of | I|

    over the neighborhood, respectively.

    mM

    mI

  • 8/13/2019 Aula 09. Deformable Contours

    14/17

    14/11/2013 Deformable Contours 14

    A Greedy Algorithm

    Letfbe the minimum fraction of snake points that must move in eachiteration before convergence, and V(p) a small neighborhood of pointp. In the beginning pi=piandd=d(used inEcont).

    While fraction greater thanfof the snake points move in an iteration:

    1. For each i=1,,N, find the location of V(pi) for which the functional isminimum, and move the snake point pi to that location,

    2. For each i=1,...,N estimate the curvature kof the snake at pias

    k=| pi-1-2pi+ pi+1|2

    and look for local maxima. Set i

    =0 for all pj

    at which the curvature has alocal maximum and exceeds a user-defined minimum value;

    3. Update the value of the average distance, d.

  • 8/13/2019 Aula 09. Deformable Contours

    15/17

    14/11/2013 Deformable Contours 15

    Comments

    1. i,i,imay be assigned all to 1, or i=i=1 and i=1.2;

    Set high if there is a deceptive Image Gradient

    Set high if smooth edged Feature, low if sharp edges

    Set high if contrast between Background and Feature is low

    2. To remove corners formed too far away from image

    edges impose a further condition:

    Point pjis a corner if and only if the curvature is locally

    maximum at pjand the norm of the intensity gradient at pjissufficiently large.

  • 8/13/2019 Aula 09. Deformable Contours

    16/17

    14/11/2013 Deformable Contours 16

    Exercise

    Download the Demoof the Greedy Algorithm shown in

    these slides, unzip the files, read the help of function

    snake_demo, and experiment with the image of a Brain CT.

    http://localhost/var/www/apps/conversion/tmp/scratch_7/Snake.ziphttp://localhost/var/www/apps/conversion/tmp/scratch_7/Snake.zip
  • 8/13/2019 Aula 09. Deformable Contours

    17/17