small example demonstrating the ProjectionParametersProjective
- Author
- sedlazeck 8/2009
#include <Geometry/ProjectionParametersProjective.hh>
using namespace BIAS;
using namespace std;
int main(int argc, char *argv[])
{
R.
SetXYZ(30.0 / 180.0 * M_PI, 10.0 / 180.0 * M_PI, 20.0 / 180.0 * M_PI);
C[0] = 0.0;
C[1] = 0.0;
C[2] = 0.0;
cout << "using P Matrix " << P << endl;
cout <<
"retrieving C " << ppp.
GetC() << endl;
cout << "ostream after setting from P : ppp " << ppp << endl;
#ifdef BIAS_HAVE_XML2
string fname = "ProjParProjExample01.xml";
if (res!=0)
{
cerr << "error reading "<< fname << endl;
return -3;
}
#endif
cout << "ostream after xml read ppp " << ppp << endl;
cout << "copy constructor " << pppc << endl;
cout << "orig 3D point " << point3D << " project/unproject " << point3DNew << endl;
cout << "point2D by Project method " << point2D1 << endl;
point2D1 = ppp.
GetP() * point3D1;
cout << "point2D by P projection " << point2D1 << endl;
return 0;
}