Yesterday evening, I had a nice chat by phone with a local development partner, here in Switzerland. I’m meeting with a member of his development team, next week, and we were establishing a way of us identifying one another at the train station. Rather than offering to wear a pink carnation, I suggested the visitor check the photo on my blog before coming. The developer – who had seen me in person, before – suggested it might be helpful if he mentioned to his colleague that I was “short and bald”… I’m apparently shorter than he’d initially expected – clearly not helped by the fact I only have a headshot posted on my blog. It did make me feel a bit like Kurt Russell’s character in Escape from L.A., where he keeps being told “I thought you’d be taller”. Not something Jeremy Tammik ever hears, I suspect. :-)
Anyway, I’ve had some fun over the last few days combining the various Kinect samples I’ve posted on this blog into a single “KinectSamples” project, which will form the core of the Kinect demos I’ll present at AU 2011. I took the opportunity to factor out common functionality from many of the samples, introducing something of a class hierarchy, in the process.
Here are the commands for you to build and try:
- KINSKEL
- “My first Kinect” sample, showing how to create a rudimentary jig to display skeleton data inside AutoCAD
- KINECT
- Dynamically displays a point cloud at the chosen resolution (see KINBOUNDS), and captures/imports a full resolution, colorised point cloud on click
- KINBOTH
- Overlays both skeleton and point cloud data in an AutoCAD jig, creating linear geometry and importing a point cloud on click
- KINSNAPS
- Captures a sequence of point clouds and combines them prior to import
- KINSAMP
- A system variable, rather than a command, that specifies the sampling rate for the point cloud display (50 means one in fifty points gets displayed, 1 means they all do)
- KINBOUNDS
- Allows definition of a clipping volume for point cloud display and import. This clipping volume is respected by all commands in the sample allowing point cloud import
- KINPOLY
- Draws a sequence of 3D polylines while jigging (and then importing) a point cloud
- KINEXT
- Sweeps a circular profile along a spline path
- KINEXT2
- Sweeps a circular profile along a spline path, creating regular segments to improve performance and reliability
- KINNAV
- Navigates a 3D model by adjusting the view based on input from Kinect
Many of these samples now use the following class hierarchy (listed with a brief description and the names of the commands they help implement):
- DrawJig (the core AutoCAD base class)
- KinectSkeletonJig (our simplest sample, kept as a flat class, to simplify copy & paste into a new project – KINSKEL)
- KinectJig (base class for the more complex samples, handles sensor initialisation and message forcing)
- KinectPointCloudJig (handles display of a point cloud - KINECT)
- KinectCombinedJig (displays a skeleton on top – KINBOTH)
- KinectDelayJig (combines a sequence of snapshots – KINSNAPS)
- KinectPolyJig (draws 3D polylines – KINPOLY)
- KinectSolidsJig (sweeps a circle along a spline path – KINEXT)
- KinectSegmentedSolidsJig (ditto in segments – KINEXT2)
- KinectPointCloudJig (handles display of a point cloud - KINECT)
I may yet factor some more in advance of AU – there may be an opportunity to put some kind of gesture handling base class in there, for instance – but having too deep a hierarchy may also make it a little harder to understand the code. We’ll see what makes sense (and I get time for).