34 #include <Base/Common/BIASpragma.hh>
43 #include <Base/Math/BogIO.hh>
44 #include <Base/Math/Vector3.hh>
45 #include <Base/Geometry/KMatrix.hh>
46 #include <Geometry/PMatrix.hh>
47 #include <Geometry/RMatrix.hh>
54 int main(
int argc,
char** argv){
55 cout<<
"started "<<argv[0]<<endl;
56 #ifdef BIAS_TESTS_DATA
57 string filename(BIAS_TESTS_DATA
"calib01.bog");
59 string filename(
"calib01.bog");
60 cout<<
"BIAS_TESTS_DATA not defined."<<endl;
63 if (argc>1) filename=argv[1];
64 cout<<
"using filename "<<filename<<endl;
69 if (0!=P.
LoadBOG(filename))
return -2;
71 P.
Save(
"out_ExampleLoadBOGP.P");
81 cout<<
"bog.K: "<<K<<endl;
82 cout<<
"P.K : "<<P.
GetK()<<endl;
84 cout<<
"bog.R: "<<R<<endl;
85 cout<<
"P.R : "<<P.
GetR()<<endl;
89 cout<<
"P.angle="<<angle<<
" axis="<<axis<<endl;
91 cout<<
"bog.C: "<<C<<endl;
92 cout<<
"P.C : "<<P.
GetC()<<endl;
int LoadBogTC(const std::string &filename)
reads the TC part of a BOG file which is used by Daimler Chrysler for storing Camera center position...
int LoadBogK(const std::string &filename, Matrix3x3< T > &mat)
int GetR(Matrix3x3< double > &R)
int LoadBOG(const std::string &filename)
Load a Daimler .bog fiel and compose a P matrix from it.
int GetC(Vector3< double > &C)
computes translation vector origin world coo -> origin camera coo (center), uses decomposition, which is cached
bool Save(const std::string &filename)
K describes the mapping from world coordinates (wcs) to pixel coordinates (pcs).
int LoadBogRC(const std::string &filename, Matrix3x3< T > &mat)
int GetRotationAxisAngle(Vector3< ROTATION_MATRIX_TYPE > &axis, ROTATION_MATRIX_TYPE &angle) const
Calculates angle and rotation axis representation for this rotation matrix.
describes a projective 3D -> 2D mapping in homogenous coordinates
int GetK(KMatrix &K)
calibration matrix