#include <energies.hh>
Inheritance diagram for oln::snakes::image_energy< I >:
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 > ¤t, const node< I > &) |
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.
|
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 } |