OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
Provide 2D Least Squares Plane model fitting The math model is that of a plane of the form:
More...
#include <ossimLeastSquaresPlane.h>
Public Member Functions | |
ossimLeastSquaresPlane (const ossimLeastSquaresPlane &) | |
ossimLeastSquaresPlane () | |
Instantiate as zero surface. More... | |
ossimLeastSquaresPlane & | operator= (const ossimLeastSquaresPlane &) |
virtual | ~ossimLeastSquaresPlane () |
Free internal storage. More... | |
virtual void | clear () |
Will clear everything and set it up to for another solve. More... | |
virtual void | addSample (double x, double y, double z_mea) |
add a single data sample. More... | |
virtual bool | getLSParms (double &pa, double &pb, double &pc) const |
return LS solution parameters. More... | |
virtual void | setLSParams (double pa, double pb, double pc) |
virtual double | lsFitValue (double xx, double yy) const |
interpolate LS-fit value at location (xx,yy) - returns z(xx,yy). More... | |
bool | solveLS () |
compute least squares parameter solution - true if succesfull. More... | |
Private Attributes | |
double | m_a |
linear-X term. More... | |
double | m_b |
linear-Y term. More... | |
double | m_c |
constant term. More... | |
NEWMAT::Matrix * | AtA |
Normal system coefficient matrix. More... | |
NEWMAT::Matrix * | Atb |
Normal system RHS vector. More... | |
ossim_uint32 | m_numSamples |
Provide 2D Least Squares Plane model fitting The math model is that of a plane of the form:
The getLSParms() method returns parameter values which are the least squares solution associated with the samples added via addSample(). Note that it is necessary to add at least three sample to obtain a solution.
Definition at line 27 of file ossimLeastSquaresPlane.h.
ossimLeastSquaresPlane::ossimLeastSquaresPlane | ( | const ossimLeastSquaresPlane & | rhs | ) |
Definition at line 35 of file ossimLeastSquaresPlane.cpp.
References AtA, Atb, m_a, m_b, and m_c.
ossimLeastSquaresPlane::ossimLeastSquaresPlane | ( | ) |
Instantiate as zero surface.
Definition at line 16 of file ossimLeastSquaresPlane.cpp.
|
virtual |
Free internal storage.
Definition at line 49 of file ossimLeastSquaresPlane.cpp.
|
virtual |
add a single data sample.
x | coordinate of sample location. |
y | coordinate of sample location. |
zmea | sample value measured at (x,y) |
Definition at line 83 of file ossimLeastSquaresPlane.cpp.
References AtA, Atb, and m_numSamples.
|
virtual |
Will clear everything and set it up to for another solve.
Just add points and call the solve method.
Definition at line 74 of file ossimLeastSquaresPlane.cpp.
References AtA, Atb, m_a, m_b, and m_c.
|
virtual |
return LS solution parameters.
pa | set to x coefficient. |
pb | set to y coefficient |
pc | set to constant term |
Definition at line 112 of file ossimLeastSquaresPlane.cpp.
|
inlinevirtual |
interpolate LS-fit value at location (xx,yy) - returns z(xx,yy).
xx | "x" coordinate at which to interpolate. |
yy | "y" "y" coordinate at which to interpolate. |
Definition at line 83 of file ossimLeastSquaresPlane.h.
ossimLeastSquaresPlane & ossimLeastSquaresPlane::operator= | ( | const ossimLeastSquaresPlane & | rhs | ) |
Definition at line 62 of file ossimLeastSquaresPlane.cpp.
References AtA, Atb, m_a, m_b, and m_c.
|
virtual |
pa | set to x coefficient. |
pb | set to y coefficient |
pc | set to constant term |
Definition at line 121 of file ossimLeastSquaresPlane.cpp.
bool ossimLeastSquaresPlane::solveLS | ( | ) |
compute least squares parameter solution - true if succesfull.
Definition at line 98 of file ossimLeastSquaresPlane.cpp.
References AtA, m_a, m_b, m_c, and m_numSamples.
|
private |
Normal system coefficient matrix.
Definition at line 110 of file ossimLeastSquaresPlane.h.
Referenced by addSample(), clear(), operator=(), ossimLeastSquaresPlane(), solveLS(), and ~ossimLeastSquaresPlane().
|
private |
Normal system RHS vector.
Definition at line 115 of file ossimLeastSquaresPlane.h.
Referenced by addSample(), clear(), operator=(), ossimLeastSquaresPlane(), and ~ossimLeastSquaresPlane().
|
private |
linear-X term.
Definition at line 95 of file ossimLeastSquaresPlane.h.
Referenced by clear(), getLSParms(), operator=(), ossimLeastSquaresPlane(), setLSParams(), and solveLS().
|
private |
linear-Y term.
Definition at line 100 of file ossimLeastSquaresPlane.h.
Referenced by clear(), getLSParms(), operator=(), ossimLeastSquaresPlane(), setLSParams(), and solveLS().
|
private |
constant term.
Definition at line 105 of file ossimLeastSquaresPlane.h.
Referenced by clear(), getLSParms(), operator=(), ossimLeastSquaresPlane(), setLSParams(), and solveLS().
|
private |
Definition at line 117 of file ossimLeastSquaresPlane.h.
Referenced by addSample(), and solveLS().