Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends
sdet_fit_lines Class Reference

#include <sdet_fit_lines.h>

Inheritance diagram for sdet_fit_lines:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 sdet_fit_lines (sdet_fit_lines_params &rpp)
 Constructors/destructor.
 ~sdet_fit_lines ()
bool fit_lines ()
 Process methods.
void clear ()
 Clear internal storage.
void set_edges (vcl_vector< vtol_edge_2d_sptr > const &edges)
 Accessors.
vcl_vector< vsol_line_2d_sptrget_line_segs ()
 Get the line segments.
void get_line_segs (vcl_vector< vsol_line_2d_sptr > &lines)
void get_line_segs (vcl_vector< vgl_line_segment_2d< double > > &lines)
bool SanityCheck ()
 Checks 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
double rms_distance_
 the max rms distance error for the fit

Protected Member Functions

void InitParams (int min_fit_length, double rms_distance)

Protected Attributes

bool segs_valid_
 protected methods.
vcl_vector< vtol_edge_2d_sptredges_
vgl_fit_lines_2d< double > fitter_
vcl_vector
< vgl_line_segment_2d< double > > 
line_segs_

Friends

vcl_ostream & operator<< (vcl_ostream &os, const sdet_fit_lines_params &flp)

Detailed Description

Definition at line 30 of file sdet_fit_lines.h.


Constructor & Destructor Documentation

sdet_fit_lines::sdet_fit_lines ( sdet_fit_lines_params rpp)

Constructors/destructor.

constructor from a parameter block (the only way).

Definition at line 26 of file sdet_fit_lines.cxx.

sdet_fit_lines::~sdet_fit_lines ( )

Definition at line 32 of file sdet_fit_lines.cxx.


Member Function Documentation

void sdet_fit_lines::clear ( )

Clear internal storage.

Definition at line 121 of file sdet_fit_lines.cxx.

bool sdet_fit_lines::fit_lines ( )

Process methods.

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 53 of file sdet_fit_lines.cxx.

vcl_vector< vsol_line_2d_sptr > sdet_fit_lines::get_line_segs ( )

Get the line segments.

Definition at line 93 of file sdet_fit_lines.cxx.

void sdet_fit_lines::get_line_segs ( vcl_vector< vsol_line_2d_sptr > &  lines)

Definition at line 108 of file sdet_fit_lines.cxx.

void sdet_fit_lines::get_line_segs ( vcl_vector< vgl_line_segment_2d< double > > &  lines)

Definition at line 113 of file sdet_fit_lines.cxx.

void sdet_fit_lines_params::InitParams ( int  min_fit_length,
double  rms_distance 
) [protected, inherited]

Definition at line 29 of file sdet_fit_lines_params.cxx.

bool sdet_fit_lines_params::SanityCheck ( ) [inherited]

Checks that parameters are within acceptable bounds.

Definition at line 39 of file sdet_fit_lines_params.cxx.

void sdet_fit_lines::set_edges ( vcl_vector< vtol_edge_2d_sptr > const &  edges)

Accessors.

Set the edges to be processed.

Definition at line 39 of file sdet_fit_lines.cxx.


Friends And Related Function Documentation

vcl_ostream& operator<< ( vcl_ostream &  os,
const sdet_fit_lines_params flp 
) [friend, inherited]

Definition at line 63 of file sdet_fit_lines_params.cxx.


Member Data Documentation

vcl_vector<vtol_edge_2d_sptr> sdet_fit_lines::edges_ [protected]

Definition at line 51 of file sdet_fit_lines.h.

Definition at line 52 of file sdet_fit_lines.h.

vcl_vector<vgl_line_segment_2d<double> > sdet_fit_lines::line_segs_ [protected]

Definition at line 53 of file sdet_fit_lines.h.

the shortest curve to fit a line

Definition at line 35 of file sdet_fit_lines_params.h.

the max rms distance error for the fit

Definition at line 36 of file sdet_fit_lines_params.h.

bool sdet_fit_lines::segs_valid_ [protected]

protected methods.

members.

Definition at line 50 of file sdet_fit_lines.h.


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