#include <Geometry/Projection.hh>
#include <Geometry/ProjectionParametersPerspective.hh>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Utils/Param.hh>
#include <Utils/IOUtils.hh>
using namespace BIAS;
using namespace std;
int main(int argc, char *argv[])
{
string *proj = params.
AddParamString(
"Projection",
"The projection to use, not mandatory",
"",
'p');
string *image = params.
AddParamString(
"Image",
"The float (depth) image to use, not mandatory",
"",
'i');
{ return 0; }
int ret = 0;
if(*proj!=""){
cout<<"Loaded projection:"<<*proj<<endl;
}
if(string(*proj)=="" || ret < 0){
cout<<"Generated sample projection."<<endl;
}
if(*image !=""){
cout<<"Loaded image :"<<*image<<endl;
}
if(string(*image)=="" || ret < 0){
depthImg.
Init(176,144,1);
cout<<"Filled standard image with 5000mm.";
if((dynamic_cast<ProjectionParametersPerspective*>(projection.
GetParameters()))!= NULL){
TransformCartesianToPolarCoordinates(depthImg, polarDepthImg);
}
cout<<" ..and transformed to polar."<<endl;
}
if((dynamic_cast<ProjectionParametersPerspective*>(projection.
GetParameters()))!= NULL){
TransformPolarToCartesianCoordinates(polarDepthImg, cartDepthImg);
TransformCartesianToPolarCoordinates(cartDepthImg,polarDepthImg);
cout<<"Transformed Images."<<endl;
}
else {
BIASERR("Not a perspective camera");
return -1;
}
return 0;
}