Be The Controller... The Project
- Posted: Aug 23, 2011 at 6:00 AM
- 7,402 Views
Today's Gallery post comes via the Kinect for Windows SDK Forum post, Easy Pose and Gesture Recognition with “Be the Controller” project
How could this not be included in the Kinect Gallery? ![]()
Be the controller is a developer’s tool kit made by Nicolas Hadjimina as part of his MSc in Computer Games Technology dissertation at the City University London. This tool aims to help programmers easily recognize user’s pose and gestures, using the Microsoft kinect controller and perform the appropriate actions. The project is divided into two parts:
1) A windows application (PoseAndGestureGenerator.exe), which allows a developer to create a list of poses and gestures that he want to recognize in his application, using an easy to use graphic interface.
2) A library (Bethecontroller.dll) which provides the infrastructure to the developer of an application to recognize the set of poses and gestures he created with the PoseAndGestureGenerator project.
The tool calculates all the relations relative to the user’s body so the position of the user in the environment is not important for the recognition of a pose as far as the kinect controller can track the user’s skeleton.
The Pose and Gesture generator, the library (dll file) and a guide how to use the project are available under the download section.
Project Information URL: http://bethecontroller.com/
Project Download URL: http://bethecontroller.com/index.php/download
Project Documentation URL: http://bethecontroller.com/BTCdownloads/BTC%20User%20Manual.pdf
Available is a sample game that uses the library. Here's a code snip of the library in use;
public Game1()
{
//load pose and gesture files
BTC.LoadPoses("Poses.pbtc");
BTC.LoadGestures("Gestures.gbtc");
graphics = new GraphicsDeviceManager(this);
this.graphics.IsFullScreen = true;
Content.RootDirectory = "Content";
}
void KinectNui_SkeletonFrameReady(object sender, SkeletonFrameReadyEventArgs e)
{
SkeletonFrame allSkeletons = e.SkeletonFrame;
skeleton = (from s in allSkeletons.Skeletons
where s.TrackingState == SkeletonTrackingState.Tracked
select s).FirstOrDefault();
}
...
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
// TODO: Add your drawing code here
Matrix view = Matrix.CreateLookAt(new Vector3(0, 0, -20), new Vector3(0, 0, 100), Vector3.Up);
Matrix projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4,
GraphicsDevice.Viewport.AspectRatio,
1.0f,
100);
// Draw the current primitive.
GeometricPrimitive currentPrimitive = primitives[currentPrimitiveIndex];
Color color = Color.Black;
DrawPrimitveSkeleton(currentPrimitive, view, projection, color);
if (startcastingRight) DrawPrimitveStartSword(primitives[1], view, projection, BTCHelper.Hand.Right, Color.WhiteSmoke);
if (startcastingLeft) DrawPrimitveStartSword(primitives[1], view, projection, BTCHelper.Hand.Left, Color.WhiteSmoke);
if (swortLeft) DrawPrimitveSword(primitives[0], view, projection, BTCHelper.Hand.Left);
if (swortRight) DrawPrimitveSword(primitives[0], view, projection, BTCHelper.Hand.Right);
// Reset the fill mode renderstate.
GraphicsDevice.RasterizerState = RasterizerState.CullCounterClockwise;
base.Draw(gameTime);
}
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?