My first post will be about Kinect. As you know Microsoft has released a beta sdk for Windows use of Kinect. Which can be downloaded via this link.
The SDK is beta, maybe that is the reason that, we can see some inconsistency in the positions we get. You can see, your leg position is changing, even if you don't move it at all.
So let's start with building something.
Let's start with building a WPF application;

That was the hardest part :D
Now, if you installed the SDK, you have to add some dlls to your solution. To accomplish, right click to references and click "Add Reference".
The DLL files you have to add are:
Microsoft.Research.Kinect.dll;
Coding4Fun.Kinect.dll;
Coding4Fun contains an extension class, which helps us to scale the environment and get positions as pixels. You can find it here.
After you add required dlls (btw Kinect dll can be found in Program Files (x86)\Microsoft Research KinectSDK\) now it's time to add namespace directives:
using Microsoft.Research.Kinect.Nui;
using Coding4Fun.Kinect.Wpf;
Now, to start, we initialize a Kinect Runtime, which MUST be disposed when the user closes the application, unless if the user wants to see the red laser light coming from the depth camera all the time. :D
To initialize a runtime we type;
Runtime nuiRuntime;
public MainWindow()
{
InitializeComponent();
nuiRuntime = new Runtime();
this.Closed += (sender, e) => nuiRuntime.Uninitialize();
}
As you know, we have depth sensor, rgb camera. We can start the peripheral in different ways. We can get pictures, video frames, or just skeleton positions, which is the only thing we need for kinectMouse.
To get skeleton positions, we add event handler, and then initialize nuiRuntime to get skeleton positions. Our code will look like:

Now, in SkeletonFrameReady event, arguement e holds skeletonframes. SkeletonFrames contains SkeletonData which has attributes such as:
TrackingState
TrackingID
Joints
Position
TrackingState must be tracked, we are going to move the mouse only if someone stands front of it. Tracking ID is the unique id given to each different skeleton. Joints holds positions for joints, and position is the general skeleton position.
Now, to start, we initialize a Kinect Runtime, which MUST be disposed when the user closes the application, unless if the user wants to see the red laser light coming from the depth camera all the time. :D
To initialize a runtime we type;
Runtime nuiRuntime;
public MainWindow()
{
InitializeComponent();
nuiRuntime = new Runtime();
this.Closed += (sender, e) => nuiRuntime.Uninitialize();
}
As you know, we have depth sensor, rgb camera. We can start the peripheral in different ways. We can get pictures, video frames, or just skeleton positions, which is the only thing we need for kinectMouse.
To get skeleton positions, we add event handler, and then initialize nuiRuntime to get skeleton positions. Our code will look like:

Now, in SkeletonFrameReady event, arguement e holds skeletonframes. SkeletonFrames contains SkeletonData which has attributes such as:
TrackingState
TrackingID
Joints
Position
TrackingState must be tracked, we are going to move the mouse only if someone stands front of it. Tracking ID is the unique id given to each different skeleton. Joints holds positions for joints, and position is the general skeleton position.