Public Member Functions | Public Attributes | Protected Member Functions | Private Attributes
vdgl_fit_lines Class Reference

#include <vdgl_fit_lines.h>

Inheritance diagram for vdgl_fit_lines:
Inheritance graph
[legend]

List of all members.

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_sptrline_segs_
 the output lines
vgl_fit_lines_2d< double > fitter_
 the fitting class

Detailed Description

Definition at line 29 of file vdgl_fit_lines.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.


Member Data Documentation

the input curves

Definition at line 32 of file vdgl_fit_lines.h.

the fitting class

Definition at line 34 of file vdgl_fit_lines.h.

the output lines

Definition at line 33 of file vdgl_fit_lines.h.

the shortest curve to fit a line; defaults to 10

Definition at line 23 of file vdgl_fit_lines_params.h.

the max rms distance error for the fit; default 0.1

Definition at line 24 of file vdgl_fit_lines_params.h.


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