ARToolKit | Mailing List Archive |
![]() |
From: | Raymond de Vries <raymond@s ......> | Received: | Feb 20, 2006 |
To | ARToolkit <artoolkit@h ..................> | ||
Subject: | How to get modelview matrix of 'loose' markers in multimarker tracker | ||
Hi Daniel, I am now using the multimarker tracker in ARToolKitPlus (2.0.1) on linux. I know how to find the (relative) matrices of the markers defined in the multimarker cfg but I can't find the functions to get the matrices of the markers which are not in the multimarker cfg file. Could you tell me how I can get these matrices? Thanks a lot. Best regards Raymond -- Raymond de Vries, VR Specialist Insight Services SARA Computing and Networking Services, PO Box 94613, 1090 GP AMSTERDAM email: raymond at sara.nl Phone +31-20-5923000 Fax +31-20-6683167 |
From: | Raymond de Vries <raymond@s ......> | Received: | Feb 21, 2006 |
To | ARToolkit <artoolkit@h ..................> | ||
Subject: | Re: How to get modelview matrix of 'loose' markers in multimarker tracker | ||
Daniel, >>I am now using the multimarker tracker in ARToolKitPlus (2.0.1) on >>linux. I know how to find the (relative) matrices of the markers defined >>in the multimarker cfg but I can't find the functions to get the >>matrices of the markers which are not in the multimarker cfg file. >> >> >> >> >i'm not sure if i understand your question... > > I will try to explain my problem in another way. Let's say I have a multimarker cfg file: 2 483 40.0 0.0 0.0 1.0000 0.0000 0.0000 0.0 0.0000 1.0000 0.0000 0.0 0.0000 0.0000 1.0000 0.0 482 40.0 0.0 0.0 1.0000 0.0000 0.0000 -60.0 0.0000 1.0000 0.0000 60.0 0.0000 0.0000 1.0000 0.0 Now, I would like to track other markers as well, for instance marker with id 428. When all 3 markers are in the viewport, the multimarker tracker detects them all (for instance "const ARToolKitPlus::ARMarkerInfo &detectedMarker = tracker->getDetectedMarker(detectedMarkerCounter);"). Now, in order to render virtual objects at the markers 482 and 483 I get the transform with "tracker->getModelViewMatrix()" and "artkpConfig->marker[multiMarkerCounter].trans" (with conversion to OpenGL coordinate system). I would also like to render at marker 428 but I don't know how to get the modelview matrix for this marker. >if you want to mix single and multi-marker tracking than you can not use >the high-level classes TrackerSingleMarker and TrackerMultiMarker but >instead you'll have to work with the base class called Tracker which >exposes the full functionality of ARToolKit(Plus). > > I will take a look there. thanks Raymond >Daniel > > > -- Raymond de Vries, VR Specialist Insight Services SARA Computing and Networking Services, PO Box 94613, 1090 GP AMSTERDAM email: raymond at sara.nl Phone +31-20-5923000 Fax +31-20-6683167 |
From: | Daniel Wagner <daniel@i ...............> | Received: | Feb 21, 2006 |
To | ARToolkit <artoolkit@h ..................> | ||
Subject: | Re: How to get modelview matrix of 'loose' markers in multimarker tracker | ||
Raymond de Vries wrote: >I am now using the multimarker tracker in ARToolKitPlus (2.0.1) on >linux. I know how to find the (relative) matrices of the markers defined >in the multimarker cfg but I can't find the functions to get the >matrices of the markers which are not in the multimarker cfg file. > > i'm not sure if i understand your question... if you want to mix single and multi-marker tracking than you can not use the high-level classes TrackerSingleMarker and TrackerMultiMarker but instead you'll have to work with the base class called Tracker which exposes the full functionality of ARToolKit(Plus). Daniel |
From: | Daniel Wagner <daniel@i ...............> | Received: | Feb 21, 2006 |
To | ARToolkit <artoolkit@h ..................> | ||
Subject: | Re: How to get modelview matrix of 'loose' markers in multimarker tracker | ||
hi Raymond, as i already mentioned, in order to use single- and multi-marker at once you'll have to use the more complex low-level Tracker API instead of the simple high-level classes. i implemented this for the ARToolKitPlus module in OpenTracker some time ago, so i know that it works... here is basically what you have to do: first call arDetectMarker() to let ARToolKitPlus find all markers in the image. this does not do any pose detection yet. like this: tracker->arDetectMarker((ARToolKitPlus::ARUint8*)frameData, tracker->getThreshold(), &markerInfo, &markerNum ); then you have to check all found markers (markerInfo) on your own and call arGetTransMat() for all marker that are known to be "single-marker" like this: // assumes that marker j is a "single-marker" // returns the transformation matrix in 'matrix' (last parameter) tracker->arGetTransMat(&markerInfo[j], source_center, source_size, matrix); then you check if any multi-marker id was found. if so, get the multi-marker-config that contains that marker and pass it onto arMultiGetTransMat(): like this: // returns the transformation matrix in mmConfig->trans tracker->arMultiGetTransMat(markerInfo, markerNum, mmConfig); that should do the trick... bye, Daniel |