AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

How To COntroll My Car By the orientation AR marker ?

Forum to discuss Glyph Recognition And Tracking Framework project, its features, applications, etc.

How To COntroll My Car By the orientation AR marker ?

Postby aymen_benk » Sun Jan 22, 2012 3:14 pm

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 ?? :)
aymen_benk
 
Posts: 3
Joined: Sun Jan 22, 2012 2:53 pm

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

Postby andrew.kirillov » Sun Jan 22, 2012 3:19 pm

Hello,

I think this article tells how to estimate orientation of an AR marker.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3243
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

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

Postby aymen_benk » Sun Jan 22, 2012 3:30 pm

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...
aymen_benk
 
Posts: 3
Joined: Sun Jan 22, 2012 2:53 pm

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

Postby aymen_benk » Sun Jan 22, 2012 3:32 pm

But how can i do it :cry: ??? have you a Source Code to do it please ?
aymen_benk
 
Posts: 3
Joined: Sun Jan 22, 2012 2:53 pm

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

Postby andrew.kirillov » Sun Jan 22, 2012 4:42 pm

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?
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3243
Joined: Fri Jan 23, 2009 9:12 am
Location: UK




Return to GRATF