DGtal  1.2.0
Public Types | Public Member Functions
DGtal::detail::CurvatureFromDSSLengthAndWidth Struct Reference

#include <DGtal/geometry/curves/estimation/SegmentComputerEstimators.h>

Public Types

typedef double Value
 

Public Member Functions

template<typename DSS >
Value operator() (const DSS &aDSS) const
 

Detailed Description

Description of class 'CurvatureFromDSSLengthAndWidth'

Aim: computes the curvature \( k \) from the length \( l \) and the width \( w \) of a DSS as follow: \( 1/k = (l*l)/(8*w) + w/2 \)

Note
Adaption from Coeurjolly, D. and Miguet, S. and Tougne, L. "Discrete Curvature Based on Osculating Circle Estimation", Proc. IWVF, LNCS, vol 2059, pp.303-312, 2001

Definition at line 1261 of file SegmentComputerEstimators.h.

Member Typedef Documentation

◆ Value

Definition at line 1264 of file SegmentComputerEstimators.h.

Member Function Documentation

◆ operator()()

template<typename DSS >
Value DGtal::detail::CurvatureFromDSSLengthAndWidth::operator() ( const DSS &  aDSS) const
inline

Definition at line 1267 of file SegmentComputerEstimators.h.

1268  {
1269  typedef typename DSS::Vector Vector;
1270  //length
1271  Vector v = ( *aDSS.begin() - *boost::prior(aDSS.end()) );
1272  Value l = v.norm(Vector::L_2);
1273  //width
1274  Vector t( aDSS.b(), aDSS.a() );
1275  Value w = 1.0 / v.norm(Vector::L_2);
1276  //result
1277  return 1.0/( (l*l)/(8.*w) + w/2 );
1278  }
FreemanChain< int >::Vector Vector

The documentation for this struct was generated from the following file: