oln::snakes::image_energy< I > Class Template Reference

#include <energies.hh>

Inheritance diagram for oln::snakes::image_energy< I >:

Inheritance graph
[legend]
Collaboration diagram for oln::snakes::image_energy< I >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef I image_type

Public Member Functions

 image_energy (void *)

Static Public Member Functions

ntg::float_s compute (const I &gradient, const node< I > &, const node< I > &current, const node< I > &)

Detailed Description

template<class I>
class oln::snakes::image_energy< I >

Energy of the gradient.

The snake should follow the edge of the object. The higher the gradient is, the less the energy is.

Definition at line 133 of file energies.hh.


Member Function Documentation

template<class I>
ntg::float_s oln::snakes::image_energy< I >::compute const I &  gradient,
const node< I > &  ,
const node< I > &  current,
const node< I > & 
[inline, static]
 

Return the energy.

The first arg is the gradient of the image; the 3 nodes are the previous, the current and the next node.

Reimplemented from oln::snakes::energy< I >.

Definition at line 67 of file energies.hxx.

00071     {
00072       // FIXME: Add magic trick: if there is very little gradient difference,
00073       // don't pay too much attention to it.
00074       // If max_gradient < min_gradient + 5: max_gradient = min_gradient + 5
00075       return ntg_sup_val(oln_value_type(I)) - gradient[current];
00076     }


The documentation for this class was generated from the following files:
Generated on Thu Apr 15 20:17:03 2004 for Olena by doxygen 1.3.6-20040222