Lab 0
1. C# Basics
We will support C# for the class. C# is like Java – the syntax is very similar. We will mostly use WPS application instead of Console Application.
(a) C# Hello World in Console Application
- Start Visual Studio 2010 (Express Editions or higher)
- Select File –> New Project –> Windows Presentation Foundation and set the name for your project
- In "Program.cs" file, type:
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello, world!");
Console.ReadLine();
}
}
}
(b) We'll cover C# WPS application in “2. Kinect SDK Basics” section below.
I recommend skimming through chapters in C# basic tutorial webpage for C# basics and skimming over WPF tutorial for WPF basics.
2. Kinect SDK Basics
We will follow Kinect SDK tutorials provided from Channel 9. You can download all the example codes and slides from here.
(a) Read and try Installing and Using the Kinect Sensor Tutorial.
Note - Sometimes Kinect will be recognized by Windows BUT will NOT be recognized by your programs. In such case, try to switch the USB port the Kinect is currently connected.
(b) Read and try Setting Up Your Development Environment Tutorial.
Note - in section "Create the Window_Loaded event" it says "Go to the properties window (F4), select the "MainWindow". You need to select the "MainWindow.xaml" from Solution Explore and left-click anyplace in background of xaml file then press (F4). To launch property window shown in tutorial, you want your current active window to be "MainWindow.xaml".
(c) Read and try Camera fundamentals Tutorial.
Note - you can skip "Task: Adjust the Kinect Camera Tilt" for now.
(d) Read and try Skeletal Tracking Fundamentals Tutorial.
Note - you may want to look at WPF programming reference for better understanding.
(e) Done!
3. Other Resources
C# Basics tutorial: http://www.csharp-station.com/Tutorial.aspx