OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimLeastSquaresBilin.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Garrett Potts (gpotts@imagelinks.com
6 //
7 // Description: Source code produced by Dave Knopp
8 //
9 //*******************************************************************
10 // $Id: ossimLeastSquaresBilin.h 9968 2006-11-29 14:01:53Z gpotts $
11 #ifndef ossimLeastSquaresBilin_INCLUDE
12 #define ossimLeastSquaresBilin_INCLUDE
14 #include <ossim/matrix/newmat.h>
15 
28 {
29 public:
30 
36 
37  ossimLeastSquaresBilin & operator = (const ossimLeastSquaresBilin &);
38 
42  virtual ~ossimLeastSquaresBilin();
43 
44 
50  virtual void clear();
51 
59  virtual void addSample(double x, double yy, double zmea);
60 
69  virtual bool getLSParms(double& pa, double& pb_x, double& pc_y, double& pd_xy)const;
70 
77  virtual void setLSParams(double pa, //constant
78  double pb_x, // linear coefficient of x,
79  double pc_y, // linear coefficient of y
80  double pd_xy); // coefficient of x*y
81 
89  virtual inline double lsFitValue(double xx, double yy) const
90  {
91  return (bl_a + bl_b*xx + bl_c*yy + bl_d*xx*yy);
92  }
93 
97  bool solveLS();
98 
99 private:
103  double bl_a;
104 
108  double bl_b;
109 
113  double bl_c;
114 
118  double bl_d;
119 
123  NEWMAT::Matrix* AtA;
124 
128  NEWMAT::Matrix* Atb;
129 };
130 
131 #endif // LeastSquaresBilinilin_INCL_
132 
ossim_uint32 x
double bl_c
linear-Y term.
#define OSSIMDLLEXPORT
double bl_a
constant term.
NEWMAT::Matrix * AtA
Normal system coefficient matrix.
Provide 2D Least Squares Bilinear model fitting The math model is that of a bilinear surface of the ...
double bl_b
linear-X term.
virtual double lsFitValue(double xx, double yy) const
interpolate LS-fit value at location (xx,yy) - returns z(xx,yy).
NEWMAT::Matrix * Atb
Normal system RHS vector.