#include <visp3/blob/vpDot2.h>
#include <visp3/core/vpPixelMeterConversion.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayOpenCV.h>
#include <visp3/gui/vpDisplayX.h>
#include <visp3/io/vpImageIo.h>
#include <visp3/vision/vpPose.h>
void computePose(std::vector<vpPoint> &point,
const std::vector<vpDot2> &dot,
const vpCameraParameters &cam,
bool init,
{
double x = 0, y = 0;
for (unsigned int i = 0; i < point.size(); i++) {
point[i].set_x(x);
point[i].set_y(y);
}
if (init == true) {
if (residual_dem < residual_lag)
cMo = cMo_dem;
else
cMo = cMo_lag;
}
}
int main()
{
try {
#if defined(VISP_HAVE_X11)
#elif defined(VISP_HAVE_GDI)
#elif defined(VISP_HAVE_OPENCV)
#endif
std::vector<vpDot2> dot(4);
std::vector<vpPoint> point;
point.push_back(
vpPoint(-0.06, -0.06, 0));
point.push_back(
vpPoint(0.06, -0.06, 0));
point.push_back(
vpPoint(0.06, 0.06, 0));
point.push_back(
vpPoint(-0.06, 0.06, 0));
bool init = true;
while (1) {
for (unsigned int i = 0; i < dot.size(); i++) {
dot[i].setGraphics(true);
dot[i].track(I);
}
computePose(point, dot, cam, init, cMo);
if (init)
init = false;
break;
}
std::cout <<
"Catch an exception: " << e.
getMessage() << std::endl;
}
}