Pilato,
ARToolkit doesn't calculate the distance between two markers.
You have to do that yourself.
Basically ARToolkit gives you the position and orientation of both markers.
And you can use those information to calculate the distance between
the two markers.
There is an example in ARToolkit, in a folder called "relation" that
does exactly that. The relation between two markers.
Mathematically, it's like what Jiang said.
inv=3Dinverse(Matrix1);
Matrix3=3Dinv*Matrix2;
Matrix1 is the transformation of marker 1
Matrix2 is the transformation of marker 2
Matrix3 is the relation of marker 1 and 2. If you check the
translation column of matrix 3, you can see the distance between
marker 1 and 2.
Ronald
www.codernaut.com
On 4/20/05, Jiang Tian <jiangt@i ..........> wrote:
> Hi
>=20
> The last column of the patt_trans matrix is the relative translation betw=
een
> marker and camera. For the second marker, the camera is the same, so you =
can
> use the inverse of the second patt_trans matrix to multiply the first one=
,
> then you will get the relative translaion between these two markers.
>=20
> Regards,
> Jiang
>=20
> >
> > Hi all,
> >
> >
> > I'm developing a work using artoolkit and have some questions.
> >
> >
> > How does ARToolKit calculate the distance ( in mm ) between two markers=
?
> >
> > Thanks a lot,
> > Pilato Jr.
> >
> >
> >
> >
> > ----------------------------------------------------------------
> > This message was sent using IMP, the Internet Messaging Program.
> >
>=20
> -------------------------------------------------------------------------=
------
> Jiang Tian
> Graduate Student, HCI Program
> Human and Computer Vision Laboratory
> Virtual Reality Application Center
> Iowa State University
> Ames, IA 50011
>=20
> Lab Phone: +1-515-294-4922
>=20
>
|