ARToolKit | Mailing List Archive |
![]() |
From: | "Hyon Lim" <alex@a ..........> | Received: | Nov 11, 2007 |
To | ARToolKit@l ................. | ||
Subject: | [ARToolKit] How can I get the absoulte position of the camera with respect to fixed marker? | ||
Hi All, In my research, the camera moves and the pattern is fixed. So I'd like to get the position of the camera in millimeter metric with respect to the pattern. How can I get the absoulte position of the camera with respect to fixed marker? (I set the center of the marker is the origin(0,0,0) of coordinate) I also want to know the principal theory for this work. I know the perspective projection matrix is consisted P=K[R t]. and world coordinate (x_w,y_w,z_w,1) is transformed to image coordinate (u,v). [u v]^t = P*(x_w,y_w,z_w,1)^t. What is the equation for this work? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.hitlabnz.org/pipermail/artoolkit/attachments/20071111/baa323eb/attachment.html _______________________________________________ ARToolKit mailing list ARToolKit@l ................. http://www.hitlabnz.org/mailman/listinfo.cgi/artoolkit |
From: | "Hyon Lim" <alex@a ..........> | Received: | Nov 11, 2007 |
To | "Nathan Funk" <nathan.funk@s ..............> | ||
Subject: | Re: [ARToolKit] How can I get the absoulte position of the camera with respect to fixed marker? | ||
Thank you for kind explanation. I think that ARToolKit has two transformation procedure. 1. Marker coordinate to Camera coordinate system. (3D to 3D) 2. Camera coordinate to Image coordinate system. (3D to 2D) where the origin of the marker coordinates is center of the marker. And its z-axis is perpendicular to paper surface (x_m, y_m, z_m, 1) [denoted by P_m] Camera coordinates z-axis is perpendicular to lens surface. (x_c, y_c, z_c, 1) [denoted by P_c] Image coordinates is two dimensional system. (x,y,1). [denoted by P_image] According to your reply, the matrix from artoolkit(3 by 4) contains matrix T which represent marker coordinates to camera coordinates. P_c = T*(P_m) right? However, I cannot understand why camera coordinate system expressed by 4x4 matrix C? I think it will be 1x4. (x_c, y_c, z_c, 1) Isn't it? Could you explain with more equation? On 11/11/07, Nathan Funk <nathan.funk@s ..............> wrote: > > Coordinate systems can be expressed as matrices. So you can express the > camera coordinate system as the 4x4 matrix C and the marker coordinate > system M. The matrices can be related through matrix multiplication C = > T * M, where T is the transform matrix. This is similar to perspective > projection, but instead you're simply expressing 3D coordinates relative > to different reference frames. > > ARToolkit can give you the transform matrix T which brings you from one > to the other reference frame. If you want to go in the inverse > direction, you simply need to invert the matrix! It's really neat when > you think of it. > > C = T * M > T^(-1) * C = T^(-1) * T * M > T^(-1) * C = M > so M = T^(-1) * C > > Inverting a matrix isn't completely trivial, and in some cases matrices > are not invertible. But I think you should be able to find a good > algorithm on through Google. > > You will need to know the size of the pattern and geometric properties > of the camera as well. > > Nathan > > Hyon Lim wrote: > > Hi All, > > In my research, the camera moves and the pattern is fixed. So I'd like > to > > get the position of the > > camera in millimeter metric with respect to the pattern. > > How can I get the absoulte position of the camera with respect to fixed > > marker? > > (I set the center of the marker is the origin(0,0,0) of coordinate) > > > > I also want to know the principal theory for this work. > > I know the perspective projection matrix is consisted P=K[R t]. > > and world coordinate (x_w,y_w,z_w,1) is transformed to image coordinate > > (u,v). > > [u v]^t = P*(x_w,y_w,z_w,1)^t. > > > > What is the equation for this work? > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: > http://www.hitlabnz.org/pipermail/artoolkit/attachments/20071111/baa323eb/attachment.html > > _______________________________________________ > > ARToolKit mailing list > > ARToolKit@l ................. > > http://www.hitlabnz.org/mailman/listinfo.cgi/artoolkit > > > > > -- > Nathan Funk > > Singular Systems > http://www.singularsys.com > > Email: nathan.funk@s .............. > Fax: (866) 840-3877 > > -- Hyon Lim Mobile. +82-10-8212-1240 Website. http://www.alexlab.net -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.hitlabnz.org/pipermail/artoolkit/attachments/20071111/4464512f/attachment.html _______________________________________________ ARToolKit mailing list ARToolKit@l ................. http://www.hitlabnz.org/mailman/listinfo.cgi/artoolkit |
From: | "Hyon Lim" <alex@a ..........> | Received: | Nov 12, 2007 |
To | "Nathan Funk" <nathan.funk@s ..............> | ||
Subject: | Re: [ARToolKit] How can I get the absoulte position of the camera with respect to fixed marker? | ||
In ARToolkit, arGetTransMat() returns 3x4 matrix that it has rotation and translation elements. Its form will be r11 r12 r13 t_x r21 r22 r23 t_y r31 r32 r33 t_z where r_xx means rotation components, t_x means translation components. However, according to your e-mail, you mentioned that C can be represented by 4x4 matrix. What are the elements of 4x4 matrix that you mentioned? Quarternions? On 11/12/07, Nathan Funk <nathan.funk@s ..............> wrote: > > The 4x4 matrix contains a lot more information than just the location of > the origin of the coordinate system. If you only want the origin, you can > look at the 4th column. The first three elements of the 4th column are the > x, y and z coordinates of the origin. But the first three columns of the > matrix represent the orientation and scaling of the coordinate axes. The > first column is the direction and scaling of the first axis and so on. > > So if you are only interested in the location of the camera with respect > to the marker, you only need to look at the forth column of the 4x4 > transform matrix. > > Nathan > > Hyon Lim wrote: > > Thank you for kind explanation. > I think that ARToolKit has two transformation procedure. > > 1. Marker coordinate to Camera coordinate system. (3D to 3D) > 2. Camera coordinate to Image coordinate system. (3D to 2D) > > where the origin of the marker coordinates is center of the marker. > And its z-axis is perpendicular to paper surface (x_m, y_m, z_m, 1) > [denoted by P_m] > > Camera coordinates z-axis is perpendicular to lens surface. (x_c, y_c, > z_c, 1) [denoted by P_c] > > Image coordinates is two dimensional system. (x,y,1). [denoted by P_image] > > According to your reply, the matrix from artoolkit(3 by 4) contains matrix > T which represent > > marker coordinates to camera coordinates. > > P_c = T*(P_m) > > right? > > However, I cannot understand why camera coordinate system expressed by 4x4 > matrix C? > I think it will be 1x4. (x_c, y_c, z_c, 1) Isn't it? > > Could you explain with more equation? > > > On 11/11/07, Nathan Funk <nathan.funk@s ..............> wrote: > > > > Coordinate systems can be expressed as matrices. So you can express the > > camera coordinate system as the 4x4 matrix C and the marker coordinate > > system M. The matrices can be related through matrix multiplication C = > > T * M, where T is the transform matrix. This is similar to perspective > > projection, but instead you're simply expressing 3D coordinates relative > > > > to different reference frames. > > > > ARToolkit can give you the transform matrix T which brings you from one > > to the other reference frame. If you want to go in the inverse > > direction, you simply need to invert the matrix! It's really neat when > > you think of it. > > > > C = T * M > > T^(-1) * C = T^(-1) * T * M > > T^(-1) * C = M > > so M = T^(-1) * C > > > > Inverting a matrix isn't completely trivial, and in some cases matrices > > are not invertible. But I think you should be able to find a good > > algorithm on through Google. > > > > You will need to know the size of the pattern and geometric properties > > of the camera as well. > > > > Nathan > > > > Hyon Lim wrote: > > > Hi All, > > > In my research, the camera moves and the pattern is fixed. So I'd like > > to > > > get the position of the > > > camera in millimeter metric with respect to the pattern. > > > How can I get the absoulte position of the camera with respect to > > fixed > > > marker? > > > (I set the center of the marker is the origin(0,0,0) of coordinate) > > > > > > I also want to know the principal theory for this work. > > > I know the perspective projection matrix is consisted P=K[R t]. > > > and world coordinate (x_w,y_w,z_w,1) is transformed to image > > coordinate > > > (u,v). > > > [u v]^t = P*(x_w,y_w,z_w,1)^t. > > > > > > What is the equation for this work? > > > -------------- next part -------------- > > > An HTML attachment was scrubbed... > > > URL: > > http://www.hitlabnz.org/pipermail/artoolkit/attachments/20071111/baa323eb/attachment.html > > > _______________________________________________ > > > ARToolKit mailing list > > > ARToolKit@l ................. > > > http://www.hitlabnz.org/mailman/listinfo.cgi/artoolkit > > > > > > > > > -- > > Nathan Funk > > > > Singular Systems > > http://www.singularsys.com > > > > Email: nathan.funk@s .............. > > Fax: (866) 840-3877 > > > > > > > -- > Hyon Lim > Mobile. +82-10-8212-1240 > Website. http://www.alexlab.net > > > > -- > Nathan Funk > > Singular Systemshttp://www.singularsys.com > > Email: nathan.funk@s .............. > Fax: (866) 840-3877 > > -- Hyon Lim Mobile. +82-10-8212-1240 Website. http://www.alexlab.net -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.hitlabnz.org/pipermail/artoolkit/attachments/20071112/8c727b12/attachment.html _______________________________________________ ARToolKit mailing list ARToolKit@l ................. http://www.hitlabnz.org/mailman/listinfo.cgi/artoolkit |