#include <vgl_fit_lines_2d.h>
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_ |
T | tol_ |
Definition at line 29 of file vgl_fit_lines_2d.h.
vgl_fit_lines_2d< T >::vgl_fit_lines_2d | ( | unsigned int | min_length = 10 , |
T | tol = 0.15 |
||
) |
Constructor.
Definition at line 15 of file vgl_fit_lines_2d.txx.
vgl_fit_lines_2d< T >::~vgl_fit_lines_2d | ( | ) | [inline] |
Definition at line 45 of file vgl_fit_lines_2d.h.
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.
void vgl_fit_lines_2d< T >::add_point | ( | vgl_point_2d< T > const & | p | ) |
void vgl_fit_lines_2d< T >::add_point | ( | T | x, |
T | y | ||
) |
add point.
Definition at line 36 of file vgl_fit_lines_2d.txx.
void vgl_fit_lines_2d< T >::clear | ( | ) |
bool vgl_fit_lines_2d< T >::fit | ( | ) |
the fitting method.
Definition at line 64 of file vgl_fit_lines_2d.txx.
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.
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.
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.
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.
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.
void vgl_fit_lines_2d< T >::set_rms_error_tol | ( | T | rms_error_tol | ) | [inline] |
Definition at line 51 of file vgl_fit_lines_2d.h.
void vgl_fit_lines_2d< T >::set_verbose | ( | bool | verbose | ) | [inline] |
Definition at line 48 of file vgl_fit_lines_2d.h.
vcl_vector<vgl_point_2d<T> > vgl_fit_lines_2d< T >::curve_ [protected] |
Definition at line 34 of file vgl_fit_lines_2d.h.
vcl_vector<int> vgl_fit_lines_2d< T >::curve_indices_ [protected] |
Definition at line 36 of file vgl_fit_lines_2d.h.
unsigned int vgl_fit_lines_2d< T >::min_length_ [protected] |
Definition at line 37 of file vgl_fit_lines_2d.h.
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.
T vgl_fit_lines_2d< T >::tol_ [protected] |
Definition at line 38 of file vgl_fit_lines_2d.h.
bool vgl_fit_lines_2d< T >::verbose_ [protected] |
Definition at line 33 of file vgl_fit_lines_2d.h.