Public Member Functions | Protected Member Functions | Protected Attributes
vgl_fit_lines_2d< T > Class Template Reference

#include <vgl_fit_lines_2d.h>

List of all members.

Public Member Functions

 vgl_fit_lines_2d (unsigned int min_length=10, T tol=0.15)
 Constructor.
 ~vgl_fit_lines_2d ()
void set_verbose (bool verbose)
void set_min_fit_length (unsigned int min_fit_length)
 set parameters.
void set_rms_error_tol (T rms_error_tol)
void add_point (vgl_point_2d< T > const &p)
 add a point to the curve.
void add_point (T x, T y)
 add point.
void add_curve (vcl_vector< vgl_point_2d< T > > const &curve)
 add an entire curve.
void clear ()
 clear internal data.
bool fit ()
 the fitting method.
vcl_vector< vgl_point_2d< T > > & get_points ()
vcl_vector
< vgl_line_segment_2d< T > > & 
get_line_segs ()
vcl_vector< int > & get_indices ()
 This vector provides an index mapping each curve point to the line it belongs to.

Protected Member Functions

void output (unsigned int start_index, unsigned int end_index)
 output a line that fits from start to end.

Protected Attributes

bool verbose_
vcl_vector< vgl_point_2d< T > > curve_
vcl_vector
< vgl_line_segment_2d< T > > 
segs_
vcl_vector< int > curve_indices_
unsigned int min_length_
tol_

Detailed Description

template<class T>
class vgl_fit_lines_2d< T >

Definition at line 29 of file vgl_fit_lines_2d.h.


Constructor & Destructor Documentation

template<class T >
vgl_fit_lines_2d< T >::vgl_fit_lines_2d ( unsigned int  min_length = 10,
tol = 0.15 
)

Constructor.

Definition at line 15 of file vgl_fit_lines_2d.txx.

template<class T >
vgl_fit_lines_2d< T >::~vgl_fit_lines_2d ( ) [inline]

Definition at line 45 of file vgl_fit_lines_2d.h.


Member Function Documentation

template<class T >
void vgl_fit_lines_2d< T >::add_curve ( vcl_vector< vgl_point_2d< T > > const &  curve) [inline]

add an entire curve.

Definition at line 58 of file vgl_fit_lines_2d.h.

template<class T >
void vgl_fit_lines_2d< T >::add_point ( vgl_point_2d< T > const &  p)

add a point to the curve.

add point.

Definition at line 26 of file vgl_fit_lines_2d.txx.

template<class T >
void vgl_fit_lines_2d< T >::add_point ( x,
y 
)

add point.

Definition at line 36 of file vgl_fit_lines_2d.txx.

template<class T >
void vgl_fit_lines_2d< T >::clear ( )

clear internal data.

clear.

Definition at line 43 of file vgl_fit_lines_2d.txx.

template<class T >
bool vgl_fit_lines_2d< T >::fit ( )

the fitting method.

Definition at line 64 of file vgl_fit_lines_2d.txx.

template<class T >
vcl_vector<int>& vgl_fit_lines_2d< T >::get_indices ( ) [inline]

This vector provides an index mapping each curve point to the line it belongs to.

An index of -1 indicates the curve point was not used in any line estimate

Definition at line 71 of file vgl_fit_lines_2d.h.

template<class T >
vcl_vector<vgl_line_segment_2d<T> >& vgl_fit_lines_2d< T >::get_line_segs ( ) [inline]

Definition at line 68 of file vgl_fit_lines_2d.h.

template<class T >
vcl_vector<vgl_point_2d<T> >& vgl_fit_lines_2d< T >::get_points ( ) [inline]

Definition at line 67 of file vgl_fit_lines_2d.h.

template<class T >
void vgl_fit_lines_2d< T >::output ( unsigned int  start_index,
unsigned int  end_index 
) [protected]

output a line that fits from start to end.

Definition at line 51 of file vgl_fit_lines_2d.txx.

template<class T >
void vgl_fit_lines_2d< T >::set_min_fit_length ( unsigned int  min_fit_length) [inline]

set parameters.

Definition at line 50 of file vgl_fit_lines_2d.h.

template<class T >
void vgl_fit_lines_2d< T >::set_rms_error_tol ( rms_error_tol) [inline]

Definition at line 51 of file vgl_fit_lines_2d.h.

template<class T >
void vgl_fit_lines_2d< T >::set_verbose ( bool  verbose) [inline]

Definition at line 48 of file vgl_fit_lines_2d.h.


Member Data Documentation

template<class T >
vcl_vector<vgl_point_2d<T> > vgl_fit_lines_2d< T >::curve_ [protected]

Definition at line 34 of file vgl_fit_lines_2d.h.

template<class T >
vcl_vector<int> vgl_fit_lines_2d< T >::curve_indices_ [protected]

Definition at line 36 of file vgl_fit_lines_2d.h.

template<class T >
unsigned int vgl_fit_lines_2d< T >::min_length_ [protected]

Definition at line 37 of file vgl_fit_lines_2d.h.

template<class T >
vcl_vector<vgl_line_segment_2d<T> > vgl_fit_lines_2d< T >::segs_ [protected]

Definition at line 35 of file vgl_fit_lines_2d.h.

template<class T >
T vgl_fit_lines_2d< T >::tol_ [protected]

Definition at line 38 of file vgl_fit_lines_2d.h.

template<class T >
bool vgl_fit_lines_2d< T >::verbose_ [protected]

Definition at line 33 of file vgl_fit_lines_2d.h.


The documentation for this class was generated from the following files: