the corresponding Euler-Lagrange equation is given by:
As the right-hand side of the equation above can be considered the gradient of , we can use it in a way analog to function minimization by gradient descent. In this way, we look for a minimum of by iteratively taking steps going "downhill" until the gradient vanishes. We introduce an "artificial" time parameter, then start from an initial function and following the opposite direction of the gradient until we arrive at a local minimum of . This leads to the following partial differential equation evolution process:
where is a function of the position in , the value of and its derivatives (possibly also higher-order) at this position. In the process of searching for a minimum of a given functional, we often make use of the Euler-Lagrange equation.
where is the velocity vector, , is the normal vector and is the curvature. In a level-set formulation, where the interface is described by a level-set function, this equation can be written:
where is the level-set function and is the curvature of the isocurves of . The full formulation is therefore:
Numerically, this can be discretized using central differencing (as decribed by [Osher03]. In order for the integration to be stable, the timestep must respect the following CFL-condition (on a 2D domain):
Motion by mean curvature is described in chapter 4 of [Osher03].
Here, represent the partitioning of the image domain into distinct regions, whereas is a smooth approximation of the image within each region (it is allowed to be discontinuous across region boundaries, though). The first term on the right side measures the distance between the approximated image and the origional image . The second term on the right side measures the regularity of within each region. The last term on the right side measures the total length of the boundaries separating the regions. and are tuneable weighing terms describing how much importance to give to the second and third right-hand-side term compared to the first.
(Here, might vary over the domain, although it is not dependent on ). This is an example of a Hamilton-Jacobi equation, and must be discretized accordingly. In order to assure stability, the timestep used must then fulfill the following CFL condition (on a 2D domain):
where and are the partial derivatives of the systems Hamiltonian with respect to and . (The Hamiltonian of this equation is ). Motion in the normal direction is described in chapter 6 of [Osher03], although there, does not vary over the domain. The theory of Hamilton-Jacobi equations and their numerical discretization is introduced in chapter 5 of the same book.
For multi-channel images (e.g., color images) with N channels, the definition is:
For various reasons, we often prefer to work with the smoothed structure tensor instead. This is obtained through convolution with a Gaussian kernel:
Much useful information about the structure tensor can be found in section 2.2 of Brox's PhD thesis.