Open vinjn opened 11 years ago
// do the OpenGL camera setup
// glMatrixMode(GL_PROJECTION)
// glLoadMatrixf(tracker.getProjectionMatrix());
// here we go, just two calls to find the camera pose
std::vector<int> markerId = tracker.calc(cameraBuffer);
tracker.selectBestMarkerByCf();
float conf = tracker.getConfidence();
// use the result of calc() to setup the OpenGL transformation
// glMatrixMode(GL_MODELVIEW)
// glLoadMatrixf(tracker.getModelViewMatrix());
printf("\n\nFound marker %d (confidence %d%%)\n\nPose-Matrix:\n ", markerId[0], (int(conf * 100.0f)));
for (int i = 0; i < 16; i++)
printf("%.2f %s", tracker.getModelViewMatrix()[i], (i % 4 == 3) ? "\n " : "");
Latest version 2.3.0
/samples/simple/main.cpp
Two types of calibration files .xml loadOpenCVCalib .cal loadARTKCalib