ARToolKit | Mailing List Archive |

[getting position to a reference marker]

From: | Pedro Cervantes <pedrocp@u ......> | Received: | May 12, 2004 |

To | "BSS" <BegoSS@t ..........>, <artoolkit@h ..................> | ||

Subject: | Re: [getting position to a reference marker] | ||

Well it's a little too late here to think fast but I'll try.. I think that you should not multiply by your Tr but by another matrix whi= ch should be (1,0,0,-a),(0,1,0,-b) and (0,0,1,-c) But only after you get the matrix from the "arUtilMatInv" function which= should give you the transformation matrix of the camera related to the marker. Anyway, if you have static markers you may also want to consider the use = of the function "arMultiGetTransMat" or maybe an algorithm like the one from= the HelloKitty project from the NUS mixed reality lab. I hope not to say anything stupid. I'm falling asleep I hope this can helps. = GREETINGS ! Pedro Cervantes "BSS" <BegoSS@t ..........> wrote: > Hello, > = > I'm trying to get the position of my camera using right now two differe= nts > markers. I consider one of them is the one at the 'origin' and the seco= nd > one is just shifted from the fisrt one in x=3Da, y=3Db and z=3Dc distan= ces ( this > is, a matrix 'Tr' with rows (1,0,0,a),(0,1,0,b) and (0,0,1,c)). If I'm > visualizing only the second marker I want to get the camera position related > to my first marker, I mean, once I get the matrix 'Tcm' referenced to t= he > marker I'm watching (the 2nd one) I want to get the matrix as if I were= > watching the first one. I'm just multiplying the Tcm matrix, with the o= ne > I've defined in advanced 'Tr' for the second marker but it seems not to= > work....what am I missing? does anybody knows how to do it? > = > thank you in advanced!! > = > = |

From: | "BSS" <BegoSS@t ..........> | Received: | May 13, 2004 |

To | <artoolkit@h ..................> | ||

Subject: | RE: [getting position to a reference marker] | ||

Hey all again. Thanks Pedro for your suggestions but I just came across with the solution this afternoon. You were right, in a key, I have to multiply the matrix I get from arGetTransMat (for the detected marker) by the matrix Tr^(-1), which is the one you said: (1,0,0,-a),(0,1,0,-b) and (0,0,1,-c). Tr^(-1)=arUtilMatInv(Tr); Doing so, when I'm detecting the second marker (or any other marker) I can still get the global position to the one at the origin. I mean, if my marker at the origin is i.e: hiro, but I cannot see it completely,and I have another marker like Panjit (which I'm able to see), doing this transformation let me draw the 3d object on the hiro marker!!! ==> no matter what marker you are watching, you can get the transformation to the one at the origin. This is useful for me cause the markers are statics within a room, but I can move with my camera and I need to know all the time the position. If anyone had this trouble or wanted to do something like this, here you have the solution. Thank you all guys!!! Begoņa.- -----Mensaje original----- Well it's a little too late here to think fast but I'll try.. I think that you should not multiply by your Tr but by another matrix which should be (1,0,0,-a),(0,1,0,-b) and (0,0,1,-c) But only after you get the matrix from the "arUtilMatInv" function which should give you the transformation matrix of the camera related to the marker. Anyway, if you have static markers you may also want to consider the use of the function "arMultiGetTransMat" or maybe an algorithm like the one from the HelloKitty project from the NUS mixed reality lab. I hope not to say anything stupid. I'm falling asleep I hope this can helps. GREETINGS ! Pedro Cervantes "BSS" <BegoSS@t ..........> wrote: > Hello, > > I'm trying to get the position of my camera using right now two differents > markers. I consider one of them is the one at the 'origin' and the second > one is just shifted from the fisrt one in x=a, y=b and z=c distances ( this > is, a matrix 'Tr' with rows (1,0,0,a),(0,1,0,b) and (0,0,1,c)). If I'm > visualizing only the second marker I want to get the camera position related > to my first marker, I mean, once I get the matrix 'Tcm' referenced to the > marker I'm watching (the 2nd one) I want to get the matrix as if I were > watching the first one. I'm just multiplying the Tcm matrix, with the one > I've defined in advanced 'Tr' for the second marker but it seems not to > work....what am I missing? does anybody knows how to do it? > > thank you in advanced!! > > |

From: | <newbeen@s .......> | Received: | May 18, 2004 |

To | <artoolkit@h ..................> | ||

Subject: | RE: [getting position to a reference marker] | ||

hi,Pedro Cervantes: Sorry to bother you,but I still don't understand very well why Tcm should be multiplied by the inverse matrix of Tr,ie (1,0,0,-a),(0,1,0,-b) and (0,0,1,-c),'cause it seems no problem that T(camera to marker1)=T(camera to marker2)*T(marker2 to marker1),here T(marker2 to marker1) is just (1,0,0,a),(0,1,0,b) and (0,0,1,c) ,that is just the former approach of BSS.Could you tell me where my mistake is? Thank you! Your kind explanation will be highly appreciated! yours, NIU Bin |