#include <sdet_fit_conics.h>
Public Member Functions | |
sdet_fit_conics (sdet_fit_conics_params &rpp) | |
Constructors/destructor. | |
~sdet_fit_conics () | |
Default Destructor. | |
bool | fit_conics () |
Process methods. | |
void | clear () |
Clear internal storage. | |
void | set_edges (vcl_vector< vtol_edge_2d_sptr > const &edges) |
Accessors. | |
vcl_vector< vsol_conic_2d_sptr > & | get_conic_segs () |
Get the conic segments. | |
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 | |
double | aspect_ratio_ |
Protected Member Functions | |
void | InitParams (int min_fit_length, double rms_distance, double aspect_ratio) |
Protected Attributes | |
bool | segs_valid_ |
protected methods. | |
vcl_vector< vtol_edge_2d_sptr > | edges_ |
vgl_fit_conics_2d< double > | fitter_ |
vcl_vector< vsol_conic_2d_sptr > | conic_segs_ |
Friends | |
vcl_ostream & | operator<< (vcl_ostream &os, const sdet_fit_conics_params &flp) |
Definition at line 28 of file sdet_fit_conics.h.
sdet_fit_conics::sdet_fit_conics | ( | sdet_fit_conics_params & | rpp | ) |
Constructors/destructor.
constructor from a parameter block (the only way).
Definition at line 23 of file sdet_fit_conics.cxx.
sdet_fit_conics::~sdet_fit_conics | ( | ) |
Default Destructor.
Definition at line 29 of file sdet_fit_conics.cxx.
void sdet_fit_conics::clear | ( | ) |
Clear internal storage.
Definition at line 116 of file sdet_fit_conics.cxx.
bool sdet_fit_conics::fit_conics | ( | ) |
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 50 of file sdet_fit_conics.cxx.
vcl_vector< vsol_conic_2d_sptr > & sdet_fit_conics::get_conic_segs | ( | ) |
Get the conic segments.
Definition at line 105 of file sdet_fit_conics.cxx.
void sdet_fit_conics_params::InitParams | ( | int | min_fit_length, |
double | rms_distance, | ||
double | aspect_ratio | ||
) | [protected, inherited] |
Definition at line 29 of file sdet_fit_conics_params.cxx.
bool sdet_fit_conics_params::SanityCheck | ( | ) | [inherited] |
Checks that parameters are within acceptable bounds.
Definition at line 40 of file sdet_fit_conics_params.cxx.
void sdet_fit_conics::set_edges | ( | vcl_vector< vtol_edge_2d_sptr > const & | edges | ) |
vcl_ostream& operator<< | ( | vcl_ostream & | os, |
const sdet_fit_conics_params & | flp | ||
) | [friend, inherited] |
Definition at line 70 of file sdet_fit_conics_params.cxx.
double sdet_fit_conics_params::aspect_ratio_ [inherited] |
Definition at line 37 of file sdet_fit_conics_params.h.
vcl_vector<vsol_conic_2d_sptr> sdet_fit_conics::conic_segs_ [protected] |
Definition at line 48 of file sdet_fit_conics.h.
vcl_vector<vtol_edge_2d_sptr> sdet_fit_conics::edges_ [protected] |
Definition at line 46 of file sdet_fit_conics.h.
vgl_fit_conics_2d<double> sdet_fit_conics::fitter_ [protected] |
Definition at line 47 of file sdet_fit_conics.h.
int sdet_fit_conics_params::min_fit_length_ [inherited] |
the shortest curve to fit a line
Definition at line 35 of file sdet_fit_conics_params.h.
double sdet_fit_conics_params::rms_distance_ [inherited] |
the max rms distance error for the fit
Definition at line 36 of file sdet_fit_conics_params.h.
bool sdet_fit_conics::segs_valid_ [protected] |