17 static ossimTrace traceExec (
"ossimObservationSet:exec");
18 static ossimTrace traceDebug (
"ossimObservationSet:debug");
28 <<
"DEBUG: ossimObservationSet(): returning..." << std::endl;
40 <<
"DEBUG: ~ossimObservationSet(): returning..." << std::endl;
50 <<
"\n ossimObservationSet::addObservation: "<<obs->
ID()<<endl;
135 NEWMAT::Matrix& objPartials,
136 NEWMAT::Matrix& parPartials)
140 measResiduals = NEWMAT::Matrix(
numMeas(), 2);
141 objPartials = NEWMAT::Matrix(
numMeas()*3, 2);
149 int numMeasPerObs =
theObs[cObs]->numMeas();
155 for (
int cImg=0; cImg<numMeasPerObs; ++cImg)
157 NEWMAT::Matrix cResid(1, 2);
158 theObs[cObs]->getResiduals(cImg, cResid);
162 <<
"\n cImg, img, cObjIndex, cParIndex, cResid: " 163 <<cImg<<
" "<<img<<
" "<<cObjIndex<<
" "<<cParIndex<<
" "<<cResid;
165 measResiduals.Row(img) = cResid;
168 NEWMAT::Matrix cObjPar(3, 2);
169 theObs[cObs]->getObjSpacePartials(cImg, cObjPar);
170 objPartials.SubMatrix(cObjIndex,cObjIndex+2,1,2) << cObjPar;
173 int numPar =
theObs[cObs]->numPars(cImg);
174 NEWMAT::Matrix cParamPar(numPar, 2);
175 theObs[cObs]->getParameterPartials(cImg, cParamPar);
176 parPartials.SubMatrix(cParIndex,cParIndex+numPar-1,1,2) << cParamPar;
199 os <<
" "<<i+1<<
": " << setw(spaces) <<
theImageFiles[i] <<
" nPar: "<< setw(2) << nAdj <<endl;
202 os<<
"\nObservations:";
205 os <<
"\n " <<
theObs[cObs]->ID();
208 os << std::setiosflags(std::ios::fixed) << std::setprecision(2);
209 os <<
"\t" <<
theObs[cObs]->getScore();
216 theObs[cObs]->getGroundPoint().print(os);
218 int numMeasPerObs =
theObs[cObs]->numMeas();
219 for (
int cImg=0; cImg<numMeasPerObs; ++cImg)
223 theObs[cObs]->getMeasurement(cImg).print(os,1);
std::ostream & print(std::ostream &os) const
text output : header + tab separated tie points
virtual ossimImageHandler * open(const ossimFilename &fileName, bool trySuffixFirst=true, bool openOverview=true) const
open that takes a filename.
ossimImageGeometry * getImageGeom(const int index)
ossim_uint32 numImages() const
ossim_uint32 numObs() const
ossim_uint32 numMeas() const
std::vector< int > theNumAdjParams
ossim_uint32 getNumberOfAdjustableParameters() const
std::vector< ossimRefPtr< ossimPointObservation > > theObs
virtual ossimAdjustableParameterInterface * getAdjustableParameterInterface()
std::vector< int > theImageIndex
unsigned int ossim_uint32
std::vector< ossimRefPtr< ossimImageHandler > > theImageHandlers
int numPars(const int index) const
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
unsigned int numImages() const
ossimFilename imageFile(const int index) const
void setImageGeom(const int index, ossimImageGeometry *geom)
unsigned int numMeas() const
static ossimImageHandlerRegistry * instance()
bool addObservation(ossimRefPtr< ossimPointObservation > obs)
operations
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::basic_ostream< char > ostream
Base class for char output streams.
std::vector< ossimFilename > theImageFiles
ossimImageGeometry * getImageGeom(const int index)
bool evaluate(NEWMAT::Matrix &measResiduals, NEWMAT::Matrix &objPartials, NEWMAT::Matrix &parPartials)
standard evaluation [1] measResiduals: [x,y] residuals (numMeas X 2) [2] objPartials: object point pa...
bool isnan(const float &v)
isnan Test for floating point Not A Number (NAN) value.