2

I'm doing a little project with ARToolkit plus. I found it strange that the detected marker id is always -1, as the confidence of the marker is also always 0.0. I've loaded the patt.hiro file provided with the standard ARTK plus zip. The code below shows what I'm doing:

snippet from the 'DrawGLScene' function:

    //Render the webcam background
IplImage* img = showWebcam();   

// do the OpenGL camera setup
glMatrixMode(GL_PROJECTION);
glLoadMatrixf(tracker->getTracker()->getProjectionMatrix());

//Detect the markers in the video frame
ARToolKitPlus::ARMarkerInfo* markerinfo=0;
int nummarkers = detectMarkers(img, &markerinfo);   

the 'detectMarkers' function:

     int detectMarkers(IplImage* image, ARToolKitPlus::ARMarkerInfo** markerinfo){

 cvFlip(image, image, 0);

int nummarkers;
tracker->getTracker()->calc((uchar*)(image->imageData), -1, false, markerinfo, &nummarkers);

return nummarkers;

The program succesfully detects markers in the scene, but doesn't give them any id or confidence ratio, even if the marker is the one loaded in the memory.. Any help really appreciated!

user1337210
  • 241
  • 3
  • 6
  • 11
  • Where's the code for `tracker->getTracker()->calc()`? It's hard to help you with your problem when you haven't shown the relevant code. – David Hammen Oct 09 '12 at 13:13
  • Nevermind, I chose to solve the marker detection problem with OpenCV since I can get some more operations on the images as from artk+.. Thanks for the help anyway! – user1337210 Oct 09 '12 at 14:49

0 Answers0