85 static ossimTrace traceExec (
"ossimFcsiModel:exec");
86 static ossimTrace traceDebug (
"ossimFcsiModel:debug");
91 static const int MODEL_VERSION_NUMBER = 1;
92 static const ossimString PARAM_NAMES[] ={
"x_pos_offset",
125 =
"camera_orientation_matrix_elem_";
141 thePrincipalPoint (0, 0),
143 theScanRotation (0.0),
144 theOpticalDistortion (0),
145 theLsrToEcfRot (3, 3),
146 theEcfOffset (0, 0, 0),
150 theFocalOffset (0.0),
151 theScanSkewCorr (0.0),
152 theAdjLsrToEcfRot (3, 3),
153 theAdjEcfToLsrRot (3, 3)
179 thePrincipalPoint (0, 0),
181 theScanRotation (0.0),
182 theOpticalDistortion (0),
183 theLsrToEcfRot (3, 3),
184 theEcfOffset (0, 0, 0),
188 theFocalOffset (0.0),
189 theScanSkewCorr (0.0),
190 theAdjLsrToEcfRot (3, 3),
191 theAdjEcfToLsrRot (3, 3)
211 thePrincipalPoint (0, 0),
213 theScanRotation (0.0),
214 theOpticalDistortion (0),
215 theLsrToEcfRot (3, 3),
216 theEcfOffset (0, 0, 0),
220 theFocalOffset (0.0),
221 theScanSkewCorr (0.0),
222 theAdjLsrToEcfRot (3, 3),
223 theAdjEcfToLsrRot (3, 3)
239 thePrincipalPoint (foxy.thePrincipalPoint),
240 theScanSkew (foxy.theScanSkew),
241 theScanRotation (foxy.theScanRotation),
242 theFocalLen (foxy.theFocalLen),
243 thePlatformPos (foxy.thePlatformPos),
244 theLsrToEcfRot (foxy.theLsrToEcfRot),
245 theEcfOffset (foxy.theEcfOffset),
246 theXrotCorr (foxy.theXrotCorr),
247 theYrotCorr (foxy.theYrotCorr),
248 theZrotCorr (foxy.theZrotCorr),
249 theFocalOffset (foxy.theFocalOffset),
250 theScanSkewCorr (foxy.theScanSkewCorr)
263 for (
int i=0; i<4; i++)
284 const double& height,
308 if (traceDebug() || debug)
346 if (traceDebug() || debug)
360 if (traceDebug() || debug)
364 for (
int i=0; i<4; i++)
378 if (traceDebug() || debug)
394 ecf_ray_dir = ecf_ray_dir*(1.0/ecf_ray_dir.
magnitude());
395 if (traceDebug() || debug)
408 if (traceDebug() || debug)
439 if (traceDebug() || debug)
455 ossimDpt film (scale*cam_ray_dir[0], scale*cam_ray_dir[1]);
457 if (traceDebug() || debug)
470 if (traceDebug() || debug)
483 if (traceDebug() || debug)
487 for (
int i=0; i<4; i++)
500 if (traceDebug() || debug)
518 out <<
"\nDump of ossimFcsiModel object at " << hex <<
this <<
":\n" 519 <<
"\nossimFcsiModel data members: " 528 for (
int i=0; i<4; ++i)
560 const char* prefix)
const 594 for (
int i=0; i<3; i++)
596 for (
int j=0; j<3; j++)
600 << i <<
"_" << j << ends;
611 ostr << prefix <<
"distortion." << ends;
634 <<
"\nInput kwl: " << kwl
646 value = kwl.
find(prefix, keyword);
651 "Type name not found");
682 value = kwl.
find(prefix, keyword);
687 "principle point x not given");
693 value = kwl.
find(prefix, keyword);
698 "principle point y not given");
705 value = kwl.
find(prefix, keyword);
710 "scale matrix 0,0 not given");
716 value = kwl.
find(prefix, keyword);
721 "scale matrix 0,1 not given");
727 value = kwl.
find(prefix, keyword);
732 "scale matrix 1,0 not given");
738 value = kwl.
find(prefix, keyword);
743 "scale matrix 1,1 not given");
749 value = kwl.
find(prefix, keyword);
756 value = kwl.
find(prefix, keyword);
763 value = kwl.
find(prefix, keyword);
768 "Focal length not given");
774 value = kwl.
find(prefix, keyword);
779 "Platform position X not given");
785 value = kwl.
find(prefix, keyword);
790 "Platform position Y not given");
795 value = kwl.
find(prefix, keyword);
800 "Platform position Z not given");
807 for (
int i=0; i<3; i++)
809 for (
int j=0; j<3; j++)
813 << i <<
"_" << j << ends;
816 value = kwl.
find(prefix, keyword);
821 "Camera orientation matrix not given");
928 NEWMAT::Matrix attitudeCorrection(3, 3);
929 attitudeCorrection(1,1) = ck*cw - sk*sp*sw;
930 attitudeCorrection(1,2) = sk*cp;
931 attitudeCorrection(1,3) = ck*sw + sk*sp*cw;
932 attitudeCorrection(2,1) = -sk*cw - ck*sp*sw;
933 attitudeCorrection(2,2) = cp*ck;
934 attitudeCorrection(2,3) = -sk*sw + ck*sp*cw;
935 attitudeCorrection(3,1) = -cp*sw;
936 attitudeCorrection(3,2) = -sp;
937 attitudeCorrection(3,3) = cp*cw;
975 for (
int i=0; i<numParams; i++)
1009 "//*****************************************************************\n" 1010 "// Template for Frame Camera Scanned Image (FCSI) model keywordlist\n" 1011 "//*****************************************************************\n" 1017 <<
"// Derived-class FCSI Keywords:\n" 1033 <<
"// Camera (LSR) to ECF orientation matrix:\n" 1036 for (
int i=0; i<3; i++)
1038 for (
int j=0; j<3; j++)
1042 << i <<
"_" << j << ends;
1043 os << ostr.str() <<
": <Euler rot matrix element>\n";
1049 <<
"// Optical distortion coefficients [OPTIONAL]:\n" 1053 <<
"N: <coeff N> (for N <= 5)\n" 1056 <<
"N: <coeff N> (for N <= 4)\n" OSSIMDLLEXPORT void ossimSetError(const char *className, ossim_int32 error, const char *fmtString=0,...)
void setParameterDescription(ossim_uint32 idx, const ossimString &descrption)
ossimEcefVector unitVector() const
static const char * FOCAL_LENGTH_KW
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
static const char * PLATFORM_POSITION_Y_KW
virtual void lineSampleHeightToWorld(const ossimDpt &image_point, const double &heightEllipsoid, ossimGpt &worldPoint) const
ossimEcefPoint intersectAboveEarthEllipsoid(const double &heightAboveEllipsoid, const ossimDatum *aDatum=ossimDatumFactory::instance() ->wgs84()) const
Represents serializable keyword/value map.
virtual void updateModel()
const char * find(const char *key) const
ossimEcefVector theEcfOffset
static const char * PRINCIPAL_POINT_X_KW
virtual void forward(const ossimDpt &undistorted_point_in, ossimDpt &distorted_point_out) const
NEWMAT::Matrix theAdjEcfToLsrRot
NEWMAT::Matrix theLsrToEcfRot
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
static const char * PRINCIPAL_POINT_Y_KW
ossimRadialDecentLensDistortion * theOpticalDistortion
static const ossimErrorCode OSSIM_ERROR
virtual ossimString getClassName() const
virtual void imagingRay(const ossimDpt &image_point, ossimEcefRay &image_ray) const
static const char * SCAN_ROTATION_ANGLE_KW
virtual std::ostream & print(std::ostream &out) const
void setOrigin(const ossimEcefPoint &orig)
ossim_uint32 getNumberOfAdjustableParameters() const
static const char * TYPE_KW
static const char * PLATFORM_POSITION_Z_KW
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
ossimDpt theSubImageOffset
ossimEcefPoint theAdjPlatformPos
static const char * DECENT_DISTORTION_COEFF_KW
virtual void clearErrorStatus() const
double theScanScaleMatrix[4]
RTTI_DEF1(ossimFcsiModel, "ossimFcsiModel", ossimSensorModel)
static const char * CAMERA_ORIENTATION_MATRIX_ELEM_KW
static const char * SCAN_SCALE_MATRIX_11_KW
double theInvScanXformMatrix[4]
double getAdjustableParameter(ossim_uint32 idx) const
static const char * PLATFORM_POSITION_X_KW
void initAdjustableParameters()
virtual std::ostream & print(std::ostream &out) const
static void writeGeomTemplate(ostream &os)
void setParameterUnit(ossim_uint32 idx, ossimUnitType unit)
static const char * SCAN_SCALE_MATRIX_00_KW
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
virtual std::ostream & print(std::ostream &out) const
virtual ossimDpt extrapolate(const ossimGpt &gp) const
static void writeGeomTemplate(ostream &os)
NEWMAT::Matrix theAdjLsrToEcfRot
virtual void setAdjustableParameter(ossim_uint32 idx, double value, bool notify=false)
virtual void setErrorStatus() const
void resizeAdjustableParameterArray(ossim_uint32 numberOfParameters)
ossimEcefPoint thePlatformPos
static const char * RADIAL_DISTORTION_COEFF_KW
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
const ossimColumnVector3d & data() const
virtual bool insideImage(const ossimDpt &p) const
virtual void worldToLineSample(const ossimGpt &world_point, ossimDpt &image_point) const
ossimDpt thePrincipalPoint
void setDirection(const ossimEcefVector &d)
static const char * SCAN_SKEW_ANGLE_KW
void setParameterSigma(ossim_uint32 idx, double value, bool notify=false)
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::basic_ostream< char > ostream
Base class for char output streams.
static const char * SCAN_SCALE_MATRIX_01_KW
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
double theScanXformMatrix[4]
double getParameterSigma(ossim_uint32 idx) const
static const char * SCAN_SCALE_MATRIX_10_KW