36 #include <Image/Camera.hh>
37 #include <Base/Image/ImageIO.hh>
38 #include <Geometry/Projection.hh>
39 #include <Geometry/ProjectionParametersPerspective.hh>
40 #include <Base/Geometry/KMatrix.hh>
46 int main(
int argc,
char** argv) {
50 BIASERR(
"don't know which image to use!/n/n usage: ExampleExtractKFromMipImage <path_to_image>");
58 BIASERR(
"specified image could not be loaded!");
61 cout <<
"image loaded successfully!" << endl;
66 BIASERR(
"image contains no valid projection!");
71 cout <<
"getting K... ";
77 cout <<
"done!" << endl;
80 ostringstream filenameK;
81 filenameK << argv[1] <<
".mat";
82 cout <<
"saving K as " << filenameK.str() << endl;
83 K.
Save(filenameK.str());
camera parameters which define the mapping between rays in the camera coordinate system and pixels in...
bool Save(const std::string &fname) const
const ProjectionParametersBase * GetParameters(unsigned int cam=0) const
const parameter access function
This class hides the underlying projection model, like projection matrix, spherical camera...
virtual BIAS::KMatrix GetK() const
static int Load(const std::string &FileName, ImageBase &img)
first tries a call to Read MIP image and if that fails, tries to Import Image with all other availabl...
K describes the mapping from world coordinates (wcs) to pixel coordinates (pcs).
const BIAS::Projection & GetProj() const
int ParseMetaData(bool bUse2x64bitTS=true)
After ImageIO::Load() operated on AppData_, this method fills P_, Timestamp, DC_*, ...