Unlike other Kinect libraries, the Kinect for Windows SDK, as its name suggests, only runs on Windows operating systems. Specifically, it runs on x86 and x64 versions of Windows 7. It has been shown to also work on early versions of Windows 8. Because Kinect was designed for Xbox hardware, it requires
roughly similar hardware on a PC to run effectively.
• Computer with a dual-core, 2.66-GHz or faster processor
• Windows 7–compatible graphics card that supports Microsoft DirectX 9.0c
• 2 GB of RAM (4 GB or RAM recommended)
• Kinect for Xbox 360 sensor
• Kinect USB power adapter
Use the free Visual Studio 2010 Express or other VS 2010 editions to program against the Kinect for Windows SDK. You will also need to have the DirectX 9.0c runtime installed. Later versions of DirectX are not backwards compatible. You will also, of course, want to download and install the latest version of the Kinect for Windows SDK. The Kinect SDK installer will install the Kinect drivers, the Microsoft Research Kinect assembly, as well as code samples.
• Microsoft Visual Studio 2010 Express or other Visual Studio 2010 edition:
• Microsoft .NET Framework 4
• The Kinect for Windows SDK (x86 or x64): http://www.kinectforwindows.com
• For C++ SkeletalViewer samples:
• DirectX Software Development Kit, June 2010 or later version:
• DirectX End-User Runtime Web Installer:
This is one of my favorite programming interview questions: “What’s the difference between Hash Tables and Binary Search Trees?”.
||Binary Search Trees
||Keys are mapped to values by using hash functions. Hash functions transform the key to a numeric index (usually by calculating an integer value from the key first, and then applying a “modulo arraysize” operation). This index identifies an array element (“bucket”), where all corresponding values reside (values which all stem from keys with equal hash value). The key must still be looked up within the bucket, but as hashing algorithms are supposed to ensure a good hash value distribution, hence small bucket size, this lookup is very fast. The bucket array may have to be resized dynamically when a certain load factor is reached.
||Node-based tree data structure, where every node contains one record (key-only, or key and value), and has a left subtree (with smaller keys) and a right subtree (with larger keys); hence keys must be comparable. Self-balancing trees, like red-black-trees, keep their height as small as possible for fast searching and inserting.
|C++ STL Implementations
||Inserting: O(1) (normal case), O(N) (worst case, only with bad hash algorithm)
Searching: O(1) (normal case), O(N) (worst case, only with bad hash algorithm).
|Inserting: O(log(n)) (when balanced)
Searching: O(log(n)) (when balanced)
||Equal objects must produce the same hash code, however unequal objects need not produce distinct hash codes. Equals() implementations must be reflexive, symmetric, transitive, consistent. More details.
.NET’s ValueType.Equals() and GetHashCode() methods are based on reflection, hence slow; you should provide your own implementation in structs.
|CompareTo() implementations must be reflexive, symmetric, transitive, consistent.More details.