Kinecting your Reception room with Kinect Reception

Description

Today's project comes from a Friend of the Gallery, Shai Raiten, who's been doing some fun stuff with Kinect. His most recent project is both a cool and fun example of how a Kinect might be used to liven up a reception room.

Instead of having the boring reception room, instead having one that not only auto-magically recognizes when someone comes in, but let's them have a little fun at the same time too.

Kinect Reception

The Idea: TV Screen in the Reception, When nothing happens (no one is in the reception) we can display videos on the screen but when some one enters the frame show him the Kinect Image, and if the user doing something funny, capture his image and save it.

The questions is how can I know if the person doing something funny?

For that I’ve created Image AuthenticManager, that contains a set of rules defining what positions or combinations are funny.

For example: If Right Hand position is higher than Head position then add 2 points, if the Left Foot position is crossing the Right Foot then add additional 2 points etc..
When the user reaches the Goal we decide then Take his picture.

Before jumping to coding let’s talk about the application flow:
The main window is controlled by two Timers and the AuthenticManager:

SeriousTimer set to 10 sec and it start to Ticking as the Kinect Skeleton Event is first fired(this event will only work when the Kinect identify a full person skeleton).
Inside the SkeletonFrameReady we also have integer called _fpsCount that increase himself by 1 each time the SkeletonFrameReady is called after starting the SeriousTimer, this will help use to make sure the user is standing in front of the Kinect and not just walk by him.
Now how can the _fbsCount will tell me that? all we need to do is multiply the SeriousTimer seconds interval by the Minimum Fps (for example 10) and the _fpsCount should be bigger is the user stand in front of the Kinect.

In this case the Timer will stop the Video feed and will display the Kinect Image.

IdleTimer by default is set to 30 seconds and each time the SkeletonFrameReady method is fired we restart the IdleTimer.

So if no events for SkeletonFrameReady the IdleTimer will return the Video feed.

JointID - AuthenticManager works with RuleObject that contains JointID Source and JointID Target (More about Joints - Kinect – Getting Started – Become The Incredible Hulk).

AuthenticManager is the heart of Kinect Reception application, this class will check if user position is funny by your own rules.

Project Information URL: http://www.codeproject.com/KB/dotnet/KinectReception.aspx & http://blogs.microsoft.co.il/blogs/shair/archive/2011/08/28/kinect-reception-tech-stuff.aspx

Project Download URL: http://www.codeproject.com/KB/dotnet/KinectReception/KinectReception.zip

image

image

image

public KinectManager()
{
    try
    {

    KinectNui = new Runtime();

    KinectNui.Initialize(RuntimeOptions.UseColor | RuntimeOptions.UseSkeletalTracking |
                            RuntimeOptions.UseColor);

    KinectNui.VideoStream.Open(ImageStreamType.Video, 2, ImageResolution.Resolution640x480, 
        ImageType.ColorYuv);

    KinectNui.SkeletonEngine.TransformSmooth = true;
    var parameters = new TransformSmoothParameters
                            {
                            Smoothing = 1.0f,
                            Correction = 0.1f,
                            Prediction = 0.1f,
                            JitterRadius = 0.05f,
                            MaxDeviationRadius = 0.05f
                            };
    KinectNui.SkeletonEngine.SmoothParameters = parameters;

    _lastTime = DateTime.Now;
    Camera = KinectNui.NuiCamera;

    IsInitialize = true;
    StatusMessage = Properties.Resources.KinectReady;
    }
    catch (InvalidOperationException ex)
    {
    IsInitialize = false;
    StatusMessage = ex.Message;
    }
}

public void ChangeCameraAngle(ChangeDirection dir)
{
    if (!IsInitialize) return;

    try
    {
    if (dir == ChangeDirection.Up)
        Camera.ElevationAngle = Camera.ElevationAngle +
        Properties.Settings.Default.ElevationAngleInterval;
    else
        Camera.ElevationAngle = Camera.ElevationAngle -
        Properties.Settings.Default.ElevationAngleInterval;

    StatusMessage = Properties.Resources.KinectReady;
    }
    catch (InvalidOperationException ex)
    {
    StatusMessage = ex.Message;
    }
    catch (ArgumentOutOfRangeException outOfRangeException)
    {
    StatusMessage = outOfRangeException.Message;
    }
} 

Contact Information:

The Discussion

Comments closed

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.