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!