#include <visp/vp1394CMUGrabber.h>
#include <visp/vp1394TwoGrabber.h>
#include <visp/vpDisplayGDI.h>
#include <visp/vpDisplayX.h>
#include <visp/vpDot2.h>
#include <visp/vpPixelMeterConversion.h>
#include <visp/vpPose.h>
void computePose(std::vector<vpPoint> &point, const std::vector<vpDot2> &dot,
#if defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI)
#endif
void computePose(std::vector<vpPoint> &point, const std::vector<vpDot2> &dot,
{
for (unsigned int i=0; i < point.size(); i ++) {
point[i].set_x(x);
point[i].set_y(y);
}
}
#if defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI)
{
if (init) {
for(unsigned int i=0; i<dot.size(); i++) {
dot[i].setGraphics(true);
dot[i].setGraphicsThickness(2);
dot[i].initTracking(I);
}
}
else {
for(unsigned int i=0; i<dot.size(); i++) {
dot[i].track(I);
}
}
}
#endif
int main()
{
#if (defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI)) && (defined(VISP_HAVE_DC1394_2) || defined(VISP_HAVE_CMU1394))
#if defined(VISP_HAVE_DC1394_2)
#elif defined(VISP_HAVE_CMU1394)
#endif
std::vector<vpDot2> dot(4);
std::vector<vpPoint> point(4);
double L = 0.06;
point[0].setWorldCoordinates(-L, -L, 0);
point[1].setWorldCoordinates( L, -L, 0);
point[2].setWorldCoordinates( L, L, 0);
point[3].setWorldCoordinates(-L, L, 0);
bool init = true;
#if defined(VISP_HAVE_X11)
#elif defined(VISP_HAVE_GDI)
#endif
while(1){
track(I, dot, init);
computePose(point, dot, cam, init, cMo);
if (init) init = false;
break;
}
}
std::cout << "Catch an exception: " << e << std::endl;
}
#endif
}