#include <iostream>
#include <Geometry/ProjectionParametersPerspective.hh>
#include <GLviewer/GLProjectionParametersPerspective.hh>
#include <GLviewer/Scenes/SceneOpenSceneGraph.hh>
#include <OpenGLFramework/RenderingContext/glfPBuffer.hh>
#include <Base/Image/ImageIO.hh>
using namespace std;
using namespace BIAS;
int main(int argc, char *argv[]) {
try {
return -1;
}
ppp.
SetUndistortion(-0.1614995748,0.1328560412,-6.499856681e-005,0.0005424174597);
vector<SceneBase*> scenes;
osg::Group* group = new osg::Group;
osg::Geometry* geom = new osg::Geometry;
osg::Vec3Array* vertices = new osg::Vec3Array(4);
osg::StateSet *stateset = group->getOrCreateStateSet();
stateset->setMode(GL_CULL_FACE,osg::StateAttribute::OVERRIDE|osg::StateAttribute::OFF);
geom->setVertexArray(vertices);
osg::Vec4Array* colors = new osg::Vec4Array(1);
(*colors)[0].set(1.0f, 1.0f, 1.0f, 1.0f);
geom->setColorArray(colors);
geom->setColorBinding(osg::Geometry::BIND_OVERALL);
geom->addPrimitiveSet(new osg::DrawArrays(GL_QUADS,0,4));
osg::Geode* geom_geode = new osg::Geode;
geom_geode->addDrawable(geom);
group->addChild(geom_geode);
scenes.push_back(&sosg);
int res=glppp.
Draw(scenes);
if(0!=res)
{
cerr<<"draw returned "<<res<<endl;
return -1;
}
cout << "get depth" << endl;
{
cerr<<"draw image empty. "<<endl;
return -1;
}
ImageIO::Save("distortest.mip",depth);
ImageIO::Save("distortest-c.mip",color);
if((d<9.8f)||(d>14.0f))
{
cerr << "unexpected depth value - distortion failed." <<endl;
return -1;
}
return 0;
}