Kinect “Where to start?”

Let’s get directly Into the Core of this Blog post,

1st Get a Kinect For windows unit.

2nd Download the SDK and the Toolkit which you will find here.

3rd Play Around with the toolkit where you will find a lot of helpful resources and demo`s.

Then let’s make a simple application to display the data from the RGB camera.

  1. Create a new WPF Project.
  2. Add reference to the Kinect Library
  3. add “using Microsoft.Kinect; “
  4. initialize sensor :
            KinectSensor Kinect;
            private void Window_Loaded_1(object sender, RoutedEventArgs e)
                if (KinectSensor.KinectSensors.Count < 1)
                    MessageBox.Show("No Kinect Sensor Attached");
            private void startkinect()
                //Link The 1st Kinect 
                Kinect = KinectSensor.KinectSensors.FirstOrDefault();
                //Enable Color Stream
                //Start Sensor
                Kinect.AllFramesReady += Kinect_AllFramesReady;
  5. At MainWindows.xaml add Image with width=320 Height=240 and Name = RGB .
  6. Now lets link the RGB Data To the Image frame.
            void Kinect_AllFramesReady(object sender, AllFramesReadyEventArgs e)
            private void colorFrame(AllFramesReadyEventArgs e)
                using (ColorImageFrame ColorFrame = e.OpenColorImageFrame())
                    if (ColorFrame == null)
                    byte [] Pixels = new byte[ColorFrame.PixelDataLength] ;
                    int stride = ColorFrame.Width*4;
                    RGB.Source = BitmapSource.Create(ColorFrame.Width
  7. One last thing don’t forget to close the Kinect When You are Done 🙂
    private void Window_Closing_1(object sender, System.ComponentModel.CancelEventArgs e)
                Kinect = null;
  8. Now You are all done,lets run It.
  9. You should be seeing a Video for what ever in front of the Kinect.


And that’s all you are Done with your 1st application , If you have any questions don’t hesitate To ask me Smile


Comments (1)

  1. Hey dude, just a idea am working on with a team: you've probably seen Jonny Lee's Wii enabled interactive whiteboard (

    We are attempting to make the same happen even better with a Kinect: We'd appreciate any resources you can share for such a project.  

Skip to main content