2 #ifndef vgl_line_2d_regression_h_ 3 #define vgl_line_2d_regression_h_ 88 #define VGL_LINE_2D_REGRESSION_INSTANTIATE(T) extern "please include vgl/algo/vgl_line_2d_regression.hxx first" 90 #endif // vgl_line_2d_regression_h_ a point in 2D nonhomogeneous space
bool fit()
Fit a line to the current point set.
double get_rms_error_est(vgl_point_2d< T > const &p, bool increment=true)
Get estimated fitting error if the point (x, y) were added to the fit.
unsigned int get_n_pts() const
The number of points added.
A class to hold the line 2d_regression data and actual fitting code.
void increment_partial_sums(const T x, const T y)
Add a point to the 2d_regression.
void init_rms_error_est()
Initialize estimated fitting error.
void clear()
Clear 2d_regression sums.
void decrement_partial_sums(const T x, const T y)
Remove a point from the 2d_regression.
double get_rms_error()
Get fitting error for current fitted line.
vgl_line_2d< T > line_
the fitted line
double squared_error_
an estimate of the squared error
bool fit_constrained(T x, T y)
Fit a line to the current point set constrained to pass through (x,y).
vgl_line_2d< T > get_line() const
Get the fitted line.
unsigned int npts_
number of points in the regression data
vgl_line_2d_regression()
Constructor.
~vgl_line_2d_regression()=default