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

#include <energies.hh>

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

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef I image_type

Public Member Functions

 curvature_energy (void *)

Static Public Member Functions

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

Detailed Description

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

Energy of curvature.

The snake is supposed to be applied on object that have smooth edge (example: an egg). The more the prev current next nodes are aligned, the less the energy is.

Definition at line 109 of file energies.hh.


Member Function Documentation

template<class I>
ntg::float_s oln::snakes::curvature_energy< I >::compute const I &  ,
const node< I > &  prev,
const node< I > &  current,
const node< I > &  next
[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 51 of file energies.hxx.

00055     {
00056       typename I::point_type twice_current;
00057 
00058       twice_current.row() = 2 * current.row();
00059       twice_current.col() = 2 * current.col();
00060       return (next + (prev - twice_current) -
00061               typename I::point_type(0,0)).norm2();
00062     }


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