Page 1 of 1

How To COntroll My Car By the orientation AR marker ?

PostPosted: Sun Jan 22, 2012 3:14 pm
by aymen_benk
Hello all I successfully created application : Keyboard controlled car in augmented reality Like the BMW Z4 http://www.bmw.co.uk/bmwuk/augmented_re ... rce=vanity
But Now i want to COntroll my Car by reading the orientation of a new AR marker ?

With Keyboard it´s like this :
// Determine rotation amount from input
Vector2 rotationAmount = new Vector2(0, 0);
if (keyboardState.IsKeyDown(Keys.Left))
{
rotationAmount.X = .1f;
}
if (keyboardState.IsKeyDown(Keys.Right))
{
rotationAmount.X = -.1f;
}
if (keyboardState.IsKeyDown(Keys.Up))
{
//rotationAmount.Y = -1.0f;
thrustAmount = .0001f;
}
if (keyboardState.IsKeyDown(Keys.Down))
{
//rotationAmount.Y = 1.0f;
thrustAmount = -.0001f;

}
Have you any idea how can i read the orientation of a new AR marker to COntroll my car Just left and right ?? :)

Re: How To COntroll My Car By the orientation AR marker ?

PostPosted: Sun Jan 22, 2012 3:19 pm
by andrew.kirillov
Hello,

I think this article tells how to estimate orientation of an AR marker.

Re: How To COntroll My Car By the orientation AR marker ?

PostPosted: Sun Jan 22, 2012 3:30 pm
by aymen_benk
thanx
I want just to read the 4 corners point of the marker and i want to obtain the position of the camera in the marker's coordinate system... i think so can i have the X and Y Coordinate to move my car left or Right...

Re: How To COntroll My Car By the orientation AR marker ?

PostPosted: Sun Jan 22, 2012 3:32 pm
by aymen_benk
But how can i do it :cry: ??? have you a Source Code to do it please ?

Re: How To COntroll My Car By the orientation AR marker ?

PostPosted: Sun Jan 22, 2012 4:42 pm
by andrew.kirillov
aymen_benk wrote:have you a Source Code to do it please ?

Can you read the article? Can you see there is sample application and source code given?