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

#include <energies.hh>

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

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef I image_type

Public Member Functions

 continuity_energy (ntg::float_s *average_dist)
ntg::float_s compute (const I &, const node< I > &prev, const node< I > &current, const node< I > &)

Detailed Description

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

Energy of continuity.

The goal of this energy is to avoid pack of nodes an lack of nodes in some part of the snake. The average distance between two consecutive points is average_dist. The more the distance between prev and current is far from average_dist, the higher the energy is.

Definition at line 79 of file energies.hh.


Member Function Documentation

template<class I>
ntg::float_s oln::snakes::continuity_energy< I >::compute const I &  ,
const node< I > &  prev,
const node< I > &  current,
const node< I > & 
[inline]
 

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 39 of file energies.hxx.

00043     {
00044       ntg::float_s d = *average_dist - (current - prev).norm2();
00045       return d > 0 ? d : -d;
00046     }


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