#include <vdgl_fit_lines.h>
Public Member Functions | |
vdgl_fit_lines (vdgl_fit_lines_params &flp) | |
constructor from a parameter block (the only way). | |
~vdgl_fit_lines () | |
void | set_curves (vcl_vector< vdgl_digital_curve_sptr > const &curves) |
Set the curves to be processed. | |
vcl_vector< vsol_line_2d_sptr > & | get_line_segs () |
Return the line segments. | |
void | clear () |
Clear the internal storage. | |
bool | SanityCheck () |
Check that parameters are within acceptable bounds. | |
void | ref () |
void | unref () |
int | get_references () const |
bool | is_referenced () const |
Public Attributes | |
int | min_fit_length_ |
the shortest curve to fit a line; defaults to 10 | |
double | rms_distance_ |
the max rms distance error for the fit; default 0.1 | |
Protected Member Functions | |
bool | fit_lines () |
Actual process method. | |
vdgl_fit_lines () | |
default constructor cannot be used. | |
Private Attributes | |
vcl_vector < vdgl_digital_curve_sptr > | curves_ |
the input curves | |
vcl_vector< vsol_line_2d_sptr > | line_segs_ |
the output lines | |
vgl_fit_lines_2d< double > | fitter_ |
the fitting class |
Definition at line 29 of file vdgl_fit_lines.h.
vdgl_fit_lines::vdgl_fit_lines | ( | vdgl_fit_lines_params & | flp | ) | [inline] |
constructor from a parameter block (the only way).
Definition at line 37 of file vdgl_fit_lines.h.
vdgl_fit_lines::~vdgl_fit_lines | ( | ) | [inline] |
Definition at line 40 of file vdgl_fit_lines.h.
vdgl_fit_lines::vdgl_fit_lines | ( | ) | [protected] |
default constructor cannot be used.
void vdgl_fit_lines::clear | ( | ) | [inline] |
Clear the internal storage.
Definition at line 47 of file vdgl_fit_lines.h.
bool vdgl_fit_lines::fit_lines | ( | ) | [protected] |
Actual process method.
Convert each digital curve to a set of vgl_point_2d<double> and add them to vgl linear regression fitter point set.
A set of line segments are computed that fit the point set within a specified mean square tolerance. The resulting vgl_line_segment_2d<double> segments are converted back to vsol geometry.
Definition at line 22 of file vdgl_fit_lines.cxx.
vcl_vector<vsol_line_2d_sptr>& vdgl_fit_lines::get_line_segs | ( | ) | [inline] |
Return the line segments.
Definition at line 45 of file vdgl_fit_lines.h.
bool vdgl_fit_lines_params::SanityCheck | ( | ) | [inherited] |
Check that parameters are within acceptable bounds.
Definition at line 8 of file vdgl_fit_lines_params.cxx.
void vdgl_fit_lines::set_curves | ( | vcl_vector< vdgl_digital_curve_sptr > const & | curves | ) | [inline] |
Set the curves to be processed.
Definition at line 43 of file vdgl_fit_lines.h.
vcl_vector<vdgl_digital_curve_sptr> vdgl_fit_lines::curves_ [private] |
the input curves
Definition at line 32 of file vdgl_fit_lines.h.
vgl_fit_lines_2d<double> vdgl_fit_lines::fitter_ [private] |
the fitting class
Definition at line 34 of file vdgl_fit_lines.h.
vcl_vector<vsol_line_2d_sptr> vdgl_fit_lines::line_segs_ [private] |
the output lines
Definition at line 33 of file vdgl_fit_lines.h.
int vdgl_fit_lines_params::min_fit_length_ [inherited] |
the shortest curve to fit a line; defaults to 10
Definition at line 23 of file vdgl_fit_lines_params.h.
double vdgl_fit_lines_params::rms_distance_ [inherited] |
the max rms distance error for the fit; default 0.1
Definition at line 24 of file vdgl_fit_lines_params.h.