OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
Provide 2D Least Squares Bilinear model fitting The math model is that of a bilinear surface of the form:
More...
#include <ossimLeastSquaresBilin.h>
Public Member Functions | |
ossimLeastSquaresBilin (const ossimLeastSquaresBilin &) | |
ossimLeastSquaresBilin () | |
Instantiate as zero surface. More... | |
ossimLeastSquaresBilin & | operator= (const ossimLeastSquaresBilin &) |
virtual | ~ossimLeastSquaresBilin () |
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 yy, double zmea) |
add a single data sample. More... | |
virtual bool | getLSParms (double &pa, double &pb_x, double &pc_y, double &pd_xy) const |
return LS solution parameters. More... | |
virtual void | setLSParams (double pa, double pb_x, double pc_y, double pd_xy) |
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 | bl_a |
constant term. More... | |
double | bl_b |
linear-X term. More... | |
double | bl_c |
linear-Y term. More... | |
double | bl_d |
cross-XY term More... | |
NEWMAT::Matrix * | AtA |
Normal system coefficient matrix. More... | |
NEWMAT::Matrix * | Atb |
Normal system RHS vector. More... | |
Provide 2D Least Squares Bilinear model fitting The math model is that of a bilinear surface 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 four sample to obtain a solution.
Definition at line 27 of file ossimLeastSquaresBilin.h.
ossimLeastSquaresBilin::ossimLeastSquaresBilin | ( | const ossimLeastSquaresBilin & | rhs | ) |
Definition at line 34 of file ossimLeastSquaresBilin.cpp.
References AtA, Atb, bl_a, bl_b, bl_c, and bl_d.
ossimLeastSquaresBilin::ossimLeastSquaresBilin | ( | ) |
Instantiate as zero surface.
Definition at line 16 of file ossimLeastSquaresBilin.cpp.
|
virtual |
Free internal storage.
Definition at line 49 of file ossimLeastSquaresBilin.cpp.
|
virtual |
add a single data sample.
xx | "x" coordinate of sample location. |
yy | "y" "y" coordinate of sample location. |
zmea | sample value measured at (xx,yy) |
Definition at line 85 of file ossimLeastSquaresBilin.cpp.
Referenced by ossimBilinearProjection::initializeBilinear(), ossim2dBilinearTransform::setFromPoints(), and ossim2dTo2dMatrixTransform::setFromPoints().
|
virtual |
Will clear everything and set it up to for another solve.
Just add points and call the solve method.
Definition at line 75 of file ossimLeastSquaresBilin.cpp.
References AtA, Atb, bl_a, bl_b, bl_c, and bl_d.
Referenced by ossimBilinearProjection::initializeBilinear().
|
virtual |
return LS solution parameters.
pa | set to constant coefficient. |
pb_x | set to linear coefficient of "x" |
pc_y | set to linear coefficient of "y" |
pd_xy | set to cross coefficient of "x*y" |
Definition at line 113 of file ossimLeastSquaresBilin.cpp.
References bl_a, bl_b, bl_c, and bl_d.
Referenced by ossim2dBilinearTransform::setFromPoints(), and ossim2dTo2dMatrixTransform::setFromPoints().
|
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 89 of file ossimLeastSquaresBilin.h.
Referenced by ossimBilinearProjection::lineSampleHeightToWorld(), ossimBilinearProjection::setTiePoints(), and ossimBilinearProjection::worldToLineSample().
ossimLeastSquaresBilin & ossimLeastSquaresBilin::operator= | ( | const ossimLeastSquaresBilin & | rhs | ) |
Definition at line 62 of file ossimLeastSquaresBilin.cpp.
References AtA, Atb, bl_a, bl_b, bl_c, and bl_d.
|
virtual |
bool ossimLeastSquaresBilin::solveLS | ( | ) |
compute least squares parameter solution - true if succesfull.
Definition at line 100 of file ossimLeastSquaresBilin.cpp.
References AtA, bl_a, bl_b, bl_c, and bl_d.
Referenced by ossimBilinearProjection::initializeBilinear(), ossim2dBilinearTransform::setFromPoints(), and ossim2dTo2dMatrixTransform::setFromPoints().
|
private |
Normal system coefficient matrix.
Definition at line 123 of file ossimLeastSquaresBilin.h.
Referenced by addSample(), clear(), operator=(), ossimLeastSquaresBilin(), solveLS(), and ~ossimLeastSquaresBilin().
|
private |
Normal system RHS vector.
Definition at line 128 of file ossimLeastSquaresBilin.h.
Referenced by addSample(), clear(), operator=(), ossimLeastSquaresBilin(), and ~ossimLeastSquaresBilin().
|
private |
constant term.
Definition at line 103 of file ossimLeastSquaresBilin.h.
Referenced by clear(), getLSParms(), operator=(), ossimLeastSquaresBilin(), setLSParams(), and solveLS().
|
private |
linear-X term.
Definition at line 108 of file ossimLeastSquaresBilin.h.
Referenced by clear(), getLSParms(), operator=(), ossimLeastSquaresBilin(), setLSParams(), and solveLS().
|
private |
linear-Y term.
Definition at line 113 of file ossimLeastSquaresBilin.h.
Referenced by clear(), getLSParms(), operator=(), ossimLeastSquaresBilin(), setLSParams(), and solveLS().
|
private |
cross-XY term
Definition at line 118 of file ossimLeastSquaresBilin.h.
Referenced by clear(), getLSParms(), operator=(), ossimLeastSquaresBilin(), setLSParams(), and solveLS().