ARToolKit | Mailing List Archive |
![]() |
From: | "BSS" <BegoSS@t ..........> | Received: | Jun 2, 2004 |
To | <artoolkit@h ..................> | ||
Subject: | needing centimeters instead of milimeters | ||
Hi all, I would like to use as the measure unit centimetres instead of milimeters. How can I tell ARToolkit or what should I change within the program so ARToolkit can consider that the patterns are given in centimeters in order to get all the distances in centimeters. Is it as simple as say i.e: patt.width=8.0 //cm, so all the calculations will be given in centimeters?? I need to overlay a virtual room I have designed as the 3D object. The problem is that if I use milimeters to design all the walls and furniture in the room, the measurements are too big and I cannot render it properly....but I would have no problem if I use centimeters (the measurements will be 10 times smaller)... I also thought about divide by 10 the translation components in the transformation matrix (that is, the fourth column)....so then, the distances camera-marker will be in centimetres and after that overlay the object (I overlay the virtual room on the real room)....but I wonder if the rotation componets should be changed in some factor, I mean, will the rotation components in the transformation matrix be the same no matter if I re-scale the translation components?? does my question make sense? what is the best way to do this? any help will be apreciated... thank you so much Begoña.- |
From: | Robert Hinn <exodus@o ........> | Received: | Jun 3, 2004 |
To | artoolkit@h .................. | ||
Subject: | Re: needing centimeters instead of milimeters | ||
I'm not sure wether that matrix is handled correctly (all values used), but I think you would rather need to change the scale part of the matrix, not the translation part. The scale values are on the diagonal of a transformation matrix: sx 0 0 0 0 sy 0 0 0 0 sz 0 0 0 0 1 So if you want to scale your object down by factor 10, you would just divide those 3 diagonal values of the matrix by 10 (they are 1 in an identity matrix). Don't modify the bottom right value of the matrix (4th row, 4th column), as this will probably mess up your calculations ;-) Maybe this works BSS schrieb: > Hi all, > > I would like to use as the measure unit centimetres instead of > milimeters. How can I tell ARToolkit or what should I change within the > program so ARToolkit can consider that the patterns are given in centimeters > in order to get all the distances in centimeters. Is it as simple as say > i.e: patt.width=8.0 //cm, so all the calculations will be given in > centimeters?? > > I need to overlay a virtual room I have designed as the 3D object. The > problem is that if I use milimeters to design all the walls and furniture in > the room, the measurements are too big and I cannot render it > properly....but I would have no problem if I use centimeters (the > measurements will be 10 times smaller)... > I also thought about divide by 10 the translation components in the > transformation matrix (that is, the fourth column)....so then, the distances > camera-marker will be in centimetres and after that overlay the object (I > overlay the virtual room on the real room)....but I wonder if the rotation > componets should be changed in some factor, I mean, will the rotation > components in the transformation matrix be the same no matter if I re-scale > the translation components?? does my question make sense? what is the best > way to do this? > > any help will be apreciated... > > thank you so much > > Begoña.- |
From: | "BSS" <BegoSS@t ..........> | Received: | Jun 8, 2004 |
To | <torbjorn.engedal@n .........> | ||
Subject: | RE: needing centimeters instead of milimeters | ||
Ok, I'm able to change that value in the second program for calibration (the one with the grid) but in the first one I cannot change any value....I mean the default value for distance between the dots is 40mm and the application doesn't ask for any change......then, when running it I get the parameters I need for the second one refered to milimeters. Where in the code of the first on (calib_dist application ) can I change 40 to 4??? :( -----Mensaje original----- De: torbjorn.engedal@n ......... [mailto:torbjorn.engedal@n .........] Enviado el: jueves, 03 de junio de 2004 8:06 Para: BSS Asunto: Re: needing centimeters instead of milimeters Hi Begoña, I recall Hirokato mentioning that the unit that is being used in ARToolKit is decided only by the unit used when calibrating the camera. Which means if you calibrate your camera and input the lengths between the points/lines in centimeters instead of millimeters, then you can/must use centimeters elsewhere as well. Best regards, Torbjørn ----------------------------------------------------- Torbjørn Engedal Associated Scientist ABB AS Corporate Research Center Bergerveien 12 NO-1375 Billingstad Norway Message from "BSS" <BegoSS@t ..........>@h .................. received on 02.06.2004 23:06 |------------+--------------+----> | | | | | | 02.06.2004 | | | | 23:06 | | | | | | | | | | |------------+--------------+----> >--------------------------------------------------------------------------- -------------------------------------------------| | | |"BSS" <BegoSS@t ..........>@h .................. | | | |Sent by owner-artoolkit@h .................. | >--------------------------------------------------------------------------- -------------------------------------------------| |-----------------------> | | | | |-----------------------> >--------------------------------------------------------------------------- --------------------------------------------------------| | | | To: <artoolkit@h ..................> | | cc: | | Subject: needing centimeters instead of milimeters | >--------------------------------------------------------------------------- --------------------------------------------------------| Hi all, I would like to use as the measure unit centimetres instead of milimeters. How can I tell ARToolkit or what should I change within the program so ARToolkit can consider that the patterns are given in centimeters in order to get all the distances in centimeters. Is it as simple as say i.e: patt.width=8.0 //cm, so all the calculations will be given in centimeters?? I need to overlay a virtual room I have designed as the 3D object. The problem is that if I use milimeters to design all the walls and furniture in the room, the measurements are too big and I cannot render it properly....but I would have no problem if I use centimeters (the measurements will be 10 times smaller)... I also thought about divide by 10 the translation components in the transformation matrix (that is, the fourth column)....so then, the distances camera-marker will be in centimetres and after that overlay the object (I overlay the virtual room on the real room)....but I wonder if the rotation componets should be changed in some factor, I mean, will the rotation components in the transformation matrix be the same no matter if I re-scale the translation components?? does my question make sense? what is the best way to do this? any help will be apreciated... thank you so much Begoña.- |