shows usage of the changed UndistortionMapping class
- Author
- bangerer (updated version)
- Date
- 09/2009
#include <bias_config.h>
#ifndef BIAS_HAVE_XML2
# error You need XML2 to compile this code. Please enable USE_XML2 and recompile BIAS.
#endif // BIAS_HAVE_XML2
#include <Image/ProjectionMapping.hh>
#include <Geometry/Projection.hh>
#include <Geometry/ProjectionParametersPerspective.hh>
#include <Geometry/ProjectionParametersSpherical.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Image/ImageConvert.hh>
#include <iostream>
using namespace BIAS;
using namespace std;
int main(int argc, char** argv )
{
if (argc<3 ) {
cout <<"Usage: ExampleUndistort <image> <projection.xml>"<<endl;
exit(1);
}
string camfile = argv[2];
if(ret < 0){
BIASERR("Error reading Projection:"<<camfile);
return -1;
}
else cout<<"Read source projection:"<<camfile<<endl;
if(ppp ==NULL){
BIASERR("Example only implemented for perspective cameras.");
return -1;
}
SetUndistortion(0.0,0.0,0.0,0.0);
BIASERR("error loading image "<<argv[1]);
return -1;
}
cout<<"Converting to RGB:"<<endl;
}
else{
cout<<"Colormodel is RGB:"<<endl;
}
cout << " created: "<<"UndistortedImage.mip"<<endl;
cout << " created: "<<"DisplacementImage.mip"<<endl;
return 0;
}