numeric
|
#include <PlaneFitting.hpp>
Classes | |
class | Result |
class | ResultNormal |
Public Types | |
typedef Eigen::Matrix< Scalar, 3, 1 > | Vector3 |
typedef Eigen::Matrix< Scalar, 3, 3 > | Matrix3 |
Public Member Functions | |
PlaneFitting () | |
PlaneFitting (const Vector3 &p, Scalar weight=1.0) | |
void | scale (Scalar scale) |
scale the statistics Note that this will not have influence on the solution, but will only change the relative weighting towards additional datums. More... | |
void | clear () |
clears all previous input to the update method More... | |
void | update (const PlaneFitting &other) |
void | update (const Vector3 &p, Scalar weight=1.0) |
Result | solve () const |
Solve the regression and return a result object. More... | |
Vector3 | getCoeffs () const |
Get the coefficients of the fitted plane. More... | |
Matrix3 | getCovariance () const |
calculate the covariance matrix More... | |
ResultNormal | solveNormal () const |
Vector3 | getNormal () const |
Public Attributes | |
Scalar | x |
Scalar | y |
Scalar | z |
Scalar | xx |
Scalar | yy |
Scalar | xy |
Scalar | xz |
Scalar | yz |
Scalar | zz |
Scalar | n |
Performs a linear least squares regression of a plane to a set of points in 3D space. The points are added incrementally using the update method, and can be weighted according to their contribution to the fit. A call to getCoeffs() will solve the regression and return the coefficients of the fitted plane. Note that the linear least squares fit is over the distance on the z-axis, and not actually the shortest distance to the plane.
typedef Eigen::Matrix<Scalar,3,3> numeric::PlaneFitting< Scalar >::Matrix3 |
typedef Eigen::Matrix<Scalar,3,1> numeric::PlaneFitting< Scalar >::Vector3 |
|
inline |
|
inlineexplicit |
|
inline |
clears all previous input to the update method
|
inline |
Get the coefficients of the fitted plane.
will return all zeros if no input was given to the update() method.
Note this function will call the solve function internally. If you need both coefficients and covariance matrix it is more efficient to call solve directly.
|
inline |
calculate the covariance matrix
Note this function will call the solve function internally. If you need both coefficients and covariance matrix it is more efficient to call solve directly.
|
inline |
|
inline |
scale the statistics Note that this will not have influence on the solution, but will only change the relative weighting towards additional datums.
|
inline |
Solve the regression and return a result object.
the result object can be queried for different aspects like coefficients, residuals or covariance matrix.
|
inline |
|
inline |
|
inline |
Scalar numeric::PlaneFitting< Scalar >::n |
Scalar numeric::PlaneFitting< Scalar >::x |
Scalar numeric::PlaneFitting< Scalar >::xx |
Scalar numeric::PlaneFitting< Scalar >::xy |
Scalar numeric::PlaneFitting< Scalar >::xz |
Scalar numeric::PlaneFitting< Scalar >::y |
Scalar numeric::PlaneFitting< Scalar >::yy |
Scalar numeric::PlaneFitting< Scalar >::yz |
Scalar numeric::PlaneFitting< Scalar >::z |
Scalar numeric::PlaneFitting< Scalar >::zz |