ARToolKit | Mailing List Archive |
![]() |
From: | Andriamasinoro Rahajaniaina <ra_haja501@y ........> | Received: | Jan 27, 2007 |
To | artoolkit@h .................. | ||
Subject: | using TrackerSingleMarkerImpl | ||
Hi, Is it possible to use several single marker with “TrackerSingleMarkerImpl” ? many thanks ___________________________________________________________________________ Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses http://fr.answers.yahoo.com |
From: | Daniel Wagner <daniel@i ...............> | Received: | Jan 27, 2007 |
To | ARToolKit Mailinglist <artoolkit@h ..................> | ||
Subject: | Re: using TrackerSingleMarkerImpl | ||
Andriamasinoro Rahajaniaina wrote: > Is it possible to use several single marker with > “TrackerSingleMarkerImpl†? > Short answer yes. Long answer: How easy it is depends on if you want to track more than one marker in the same image or not. TrackerSingleMarker is optimized for an easy API usage. Calling calc() will return the id of the best detected marker. You can then call getARMatrix() to get the pose of that marker. This will always only return the best marker in the image. If you want to track all markers in the image then you'll have to use the more general Tracker API, which is more or less identical (with many extensions) to that of ARToolKit. I know that this is not ideal and we'll probably add a new, more powerful interface in the future that unites single- and multi-marker tracking with all those features people usually require and the easiness of the current APIs. Daniel |
From: | "Mingwei Shen" <mingwei82@g ........> | Received: | Jan 29, 2007 |
To | artoolkit@h .................. | ||
Subject: | Re: using TrackerSingleMarkerImpl | ||
------=_Part_102586_25996908.1170037781388 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline You can also have multiple trackers. But because it returns the best id-image, you can use your own markers instead of id-markers. You lose efficiency and depending on the complexity of your system, this might really slow down your system. But if you have only 2 or 3 single markers, you should be able to do so before future API comes about. You can still use id-markers for 2 of those trackers, ie. simple and bch markers. On 1/27/07, Daniel Wagner <daniel@i ...............> wrote: > > Andriamasinoro Rahajaniaina wrote: > > Is it possible to use several single marker with > > "TrackerSingleMarkerImpl" ? > > > Short answer yes. > > Long answer: > How easy it is depends on if you want to track more than one marker in > the same image or not. TrackerSingleMarker is optimized for an easy API > usage. Calling calc() will return the id of the best detected marker. > You can then call getARMatrix() to get the pose of that marker. This > will always only return the best marker in the image. > If you want to track all markers in the image then you'll have to use > the more general Tracker API, which is more or less identical (with many > extensions) to that of ARToolKit. > > I know that this is not ideal and we'll probably add a new, more > powerful interface in the future that unites single- and multi-marker > tracking with all those features people usually require and the easiness > of the current APIs. > > Daniel > > ------=_Part_102586_25996908.1170037781388 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline You can also have multiple trackers. But because it returns the best id-image, you can use your own markers instead of id-markers. You lose efficiency and depending on the complexity of your system, this might really slow down your system. But if you have only 2 or 3 single markers, you should be able to do so before future API comes about. You can still use id-markers for 2 of those trackers, ie. simple and bch markers. <br><br><br><div><span class="gmail_quote">On 1/27/07, <b class="gmail_sendername">Daniel Wagner</b> <<a href="mailto:daniel@i ...............">daniel@i ...............</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Andriamasinoro Rahajaniaina wrote:<br>> Is it possible to use several single marker with<br>> "TrackerSingleMarkerImpl" ?<br>><br>Short answer yes.<br><br>Long answer:<br>How easy it is depends on if you want to track more than one marker in <br>the same image or not. TrackerSingleMarker is optimized for an easy API<br>usage. Calling calc() will return the id of the best detected marker.<br>You can then call getARMatrix() to get the pose of that marker. This<br> will always only return the best marker in the image.<br>If you want to track all markers in the image then you'll have to use<br>the more general Tracker API, which is more or less identical (with many<br>extensions) to that of ARToolKit. <br><br>I know that this is not ideal and we'll probably add a new, more<br>powerful interface in the future that unites single- and multi-marker<br>tracking with all those features people usually require and the easiness <br>of the current APIs.<br><br>Daniel<br><br></blockquote></div><br> ------=_Part_102586_25996908.1170037781388-- |
From: | "Victor Ng-Thow-Hing" <victorngthowhing@y ........> | Received: | Jan 29, 2007 |
To | "'Andriamasinoro Rahajaniaina'" <ra_haja501@y ........>, <artoolkit@h ..................> | ||
Subject: | RE: using TrackerSingleMarkerImpl | ||
Hi, I've been able to successfully track multiple markers with a single call = to the TrackerSingleMarker calc() method. The key idea is to get access to the low-level marker data by using the extra parameters in calc and making sure you allocate enough memory for = all the markers with Init. You then process the marker data manually to = extract out the markers. I think this is better than multiple calls to calc with different = pattern numbers because you avoid processing the image multiple times. In the = code below, m_Tracker is of type ARToolKitPlus::TrackerSingleMarker. The stl = list m_MarkerData collects data on each marker, including a flag to hide or = show it. Notice I also chose to set the updatematrix flag in calc to false = to avoid recomputing it twice since I do it manually with calcOpenGLMatrixFromMarker. Hope this helps! Vic =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D // New general multiple marker tracker code. Avoids processing video frame multiple times ARToolKitPlus::ARMarkerInfo *markerinfo; int nummarkers; // Do not calculate opengl matrix (set nUpdateMatrix to false) since we'll do it ourselves m_Tracker->calc(data,-1,false,&markerinfo,&nummarkers); int size =3D m_MarkerData.size(); for (int c =3D 0; c < size; c++) { int k =3D -1; for (int m =3D 0; m < nummarkers; m++) { if (markerinfo[m].id =3D=3D c) { if (k =3D=3D -1)=20 k =3D m; else if (markerinfo[k].cf < markerinfo[m].cf) k =3D m; } } if (k =3D=3D -1) { // no marker found m_MarkerData[c].m_Visible =3D false; } else { // marker found m_MarkerData[c].m_Visible =3D true; m_MarkerData[c].m_Confidence =3D markerinfo[k].cf; ARFloat center[2] =3D {0.0f,0.0f}; ARFloat patttrans[3][4]; =09 m_Tracker->calcOpenGLMatrixFromMarker(&markerinfo[k],center,m_MarkerData[= c]. m_Width,(ARFloat *)m_MarkerData[c].m_ModelViewMat); } // end markers -----Original Message----- From: owner-artoolkit@h .................. [mailto:owner-artoolkit@h ..................] On Behalf Of Andriamasinoro Rahajaniaina Sent: Saturday, January 27, 2007 4:40 AM To: artoolkit@h .................. Subject: using TrackerSingleMarkerImpl Hi, Is it possible to use several single marker with = =93TrackerSingleMarkerImpl=94 ? many thanks =09 =09 =09 _________________________________________________________________________= __=20 D=E9couvrez une nouvelle fa=E7on d'obtenir des r=E9ponses =E0 toutes vos = questions ! Profitez des connaissances, des opinions et des exp=E9riences des = internautes sur Yahoo! Questions/R=E9ponses=20 http://fr.answers.yahoo.com |