Recent posts / Archive

Categories

Gradient Vector Flow

Originally posted by on 06:00 Fri 27 January 2006, last modified 12:17 Mon 7 May 2007.

File under: active contours object segmentation phd

As already stated, active contours have difficulties progressing into concave boundaries. This has motivated research in this area, with some prominent findings, one of which is discussed here.

Xu and Prince [1] presents a new external force for active contours, that replaces the commonly used image edge magnitude. This external force is called Gradient Vector Flow (GVF), and is dense vector field that is generated by minimising an energy functional in a variational framework. The GVF Snake’s external is specified directly from a force balance equation, as shown below:

Force balance equation:  (g) F int + F ext = 0

where the second term is a generalised external force model, as opposed to a potential force model, such as image edges. We define the general external force to be

External force: (g) F ext = v(x,y)

Substituting this into Euler’s equation, given previously, in place of -∇Eimg we obtain

Euler's Equation: qt(s,t) = αq′′(s,t)- βq′′′′(s,t)+ v

The parametric curve solving the above dynamic equation is called a GVF snake [1]. It is solved in the same manner as the greedy algorithm, by discretisation and iteration.

Okay.... so....

The GVF aims to remove the undesirable characteristics of a normal edge map with regard to their use as an external force field for snakes. The properties of an edge map are:

     
  1. Gradient of an edge map will have vectors that point toward the edges
  2. Vectors have large magnitudes only in the vicinity near the edges.
  3. In homogeneous regions where the image intensity is nearly constant, the gradient is nearly zero.

Properties 2 and 3 are undesirable, as they contribute to the capture range of the snake, i.e. the range of initial contours that will result in a desirable snake, being small. Therefore the GVF aims to keep the desirable first property, and extend the gradient map away from the edges into the homogeneous regions using a computational diffusion process. The important benefit of this is that the diffusion process will create vectors that point into boundary concavities.

Xu and Prince [1] define the GVF field to be the vector field v(x,y) = [u(x,y), v(x,y)], that minimises the energy functional:

Euler's Equation: ε = ∫∫ μ ( ux^2 + uy^2 + vx^2 + vy^2 ) + |∇f|^2 |v - ∇f|^2 dx dy

where f(x,y) is an edge map derived from an image I(x,y). Using calculus of variations it can be shown that the vector field can be found by solving the following Euler equations:

μ∇2u - (u - fx)(fx2 + fy2) = 0
μ∇2v - (v - fy)(fx2 + fy2) = 0

Xu and Prince [1] give details on the numerical implementation of the solution of the above equation, which I will not unnecessarily repeat here. My algorithm for a GVF snake works in much the same way as the Greedy algorithm discussed previously, to the extent that the Python class implementing it, is a subclass of the Snake class used for Greedy active contours. Additional methods compute the GVF field which then replaces the edge data, before the main greedy loop is executed.

References

[1]   C. Xu and J. L. Prince. Snakes, shapes, and gradient vector flow. IEEE Transactions on Image Processing, 7:359–369, 1998.

comment