Recent Projects Rollup

Posted December 13, 2012 8:50 PM Categories: Coding4Fun | MJPEG | Kinect

A few things I’ve worked on or written have gone up in the past couple of months, so here’s a quick list of what they are and where you can get them:

Kinect Service v1.6

DownloadThe Coding4Fun Kinect Service allows you to stream Kinect color, depth, skeleton, and audio from one PC to another PC or a Windows Phone via sockets.  This new release now includes Windows Runtime Components written in C++ which target x86, x64 and ARM.  Now you can stream Kinect data to a Windows Store app!


eb2a8836-cf09-473e-a2a4-25640aaf5781For //build/ 2012, us Coding4Fun folks wanted to showcase what Windows 8 can offer developers.  There are a lot of projects showing off great things like contracts and Live Tiles, but we wanted to show off some of the lesser known features.  This project focuses on one of those: stereoscopic 3D with DirectX 11.1.  Imagine ridiculously over-engineered 3D pong, and that’s Maelstrom!

MJPEG Decoder v1.2

The latest release of my MJPEG Decoder contains a Windows Runtime component to allow you to read MJPEG data from an IP camera and display the stream in a Windows Store application.  You’ll also find libraries to read MJPEG streams for WPF, WinForms, Silverlight, XNA and Windows Phone,

TechEd North America 2012

Posted June 7, 2012 9:42 AM Categories: Coding4Fun | Events | Kinect | TechEd'm off to TechEd North America later this week where we'll be showing off the Project Detroit car and our BoxingBots project previously demonstrated at SXSW in March. 

09615539-1a33-49f7-b438-ca1b9543d712 IMG_0296[5] 

Dan Fernandez and I will also be giving a talk on Kinect goodness.  Here are the details:

Coding4Fun: Build Fun, Cool, Commercial Applications Using the Kinect for Windows SDK

Session Code: DEV330
Speaker(s): Brian Peek, Dan Fernandez
Tuesday, June 12 at 5:00 PM - 6:15 PM in S320A

Come to this must-see session to find out how you can use the Kinect for Windows SDK to build commercial applications! Learn how the RGB and depth cameras work, how to use and fine-tune skeletal tracking, how to read an audio stream from the Kinect microphone array and even how to send Kinect data over the network including to your Windows Phone

This same session will be given at TechEd Europe in two weeks, with Clint Rutkas playing the part of me.  I will not be at the Europe conference.

So, if you're attending either TechEd this year, please stop by the Coding4Fun areas or our session and say hello!

Visual Studio Live! - New York

Posted April 17, 2012 9:22 AM Categories: Async | Events | Kinect | VSLive New York | XNA

I will be speaking at Visual Studio Live! in New York this May 14-17.  The conference is a full 4 day event and there’s still time to register!  The three sessions I’m presenting are:

W01 – Get Connected with Kinect 
Date: Wednesday, May 16, 2012
Time: 9:15 AM – 10:30 AM 
Level: Introductory

By now we’ve all probably tried Kinect, Microsoft’s revolutionary motion control device for the Xbox 360. But what about developing software to use the device? With the release of the official Kinect for Windows SDK from Microsoft, developers can now use this device like any other hardware peripheral from code. This session will introduce developers to the Kinect device itself, how it works, and will offer an overview of the API provided by Microsoft to retrieve image, depth, skeletal, audio, and audio position information from the device. The session will also cover some interesting uses for this information, and how it can be used in traditional applications for easier navigation to provide a more natural user interface.

W12 – Advanced XNA Games for Windows Phone
Date: Wednesday, May 16, 2012
Time: 1:30 PM – 2:45 PM 
Level: Intermediate to Advanced

XNA is an extremely powerful platform that extends far beyond simple 2D sprite-based games. In this session, learn how to build 3D games and the deal with the complexities that come with moving to the third dimension. The session will consist of building a very simple 3D game for Windows Phone. Specifically, attendees will learn how to import pre-built 3D models, animate them, and display them in 3D space. Additionally, the session will cover shader-based effects, handling user input, playing sounds and music, and putting it all together for submission to the Marketplace.

TH16 - Writing Asynchronous Code Using .NET 4.5 and C# 5.0
Date: Thursday, May 17, 2012
Time: 1:30 PM – 2:45 PM 
Level: Introductory

A variety of new features were added to the .NET 4.5 Framework, including support for easily writing asynchronous code. This session will introduce the concepts of asynchronous programming, .NET Tasks, how to ensure your UI remains responsive, and how to do all of this properly in your own applications using the new async and await keywords. If you’re looking for ways to provide a better, smoother experience for your users, don’t miss this session!

As always, I will be hosting another round of Developer Duel on Tuesday night during the VSLive After Dark event.  Join us for the event and have a chance to win fabulous prizes while playing a game similar to one you’ve seen on TV for the past 30 years…


Get more information on the conference at:

Hope to see you all there!

Kinect at Tech Valley .NET User Group

Posted December 6, 2011 8:15 AM Categories: .NET | Events | Kinect | Tech Valley Code Camp

imageFor my fellow Capital District folks, I’ll be giving a session to the Tech Valley .NET Users Group (TVUG) Tuesday, December 13th at 6:30pm on everything that is Kinect and the Kinect for Windows SDK  Here are the details….

Where: Tyler Technologies, Latham, NY
When: Tuesday, December 13th, 2011, 6:30-8:30PM

Join us as Brian Peek demonstrates the basics of using the Kinect for Windows SDK including:  how Kinect works, installing and setting up the Kinect sensor, setting up the development environment, reading camera, depth and skeleton data, understanding what depth data is and how it works, skeletal tracking and working with the Kinect microphone array to record audio and use speech recognition.

Hope to see you all there!

Kinect for Windows SDK + XNA

Posted November 21, 2011 8:13 AM Categories: .NET | C# | Kinect | XNA

imageI have seen a few people talk about using the Kinect for Windows SDK with XNA lately, and many of those projects aren't using the SDK how it's intended to be used from a framework such as this.

When I had a hand in working on the managed SDK, I made a point that the API should allow for both an "eventing" model, and a polling model.  In the land of WPF and WinForms, an eventing model makes perfect sense.  In these frameworks, the SDK is intended to be used thusly:

private Nui.Runtime _kinect = Nui.Runtime.Kinects[0];

private void Window_Loaded(object sender, RoutedEventArgs e)
    _kinect.DepthFrameReady += DepthFrameReady;
    _kinect.SkeletonFrameReady += SkeletonFrameReady;

void DepthFrameReady(object sender, ImageFrameReadyEventArgs e)
    // do something with the depth frame

void SkeletonFrameReady(object sender, SkeletonFrameReadyEventArgs e)
    // do something with the skeleton frame

But, in the land of XNA, where all of your code is shared between the Update and Draw methods, and where events don't really exist in the normal flow of things, trying to synchronize the Kinect events and the data they provide with the Update and Draw loop can be difficult, and can lead to conditions where data is being updated from an event while you're touching it in the Update method.  Sure, you could use locks to help synchronize things, but there's an easier way.

To help with this, the API contains methods to directly poll for the latest data, such as the current depth frame or skeleton frame.  These methods can be used as shown:

private Runtime _kinect = Runtime.Kinects[0];
private SkeletonFrame _skeletonFrame;
private ImageFrame _depthFrame;

protected override void Update(GameTime gameTime)
    _skeletonFrame = _kinect.SkeletonEngine.GetNextFrame(0);
    _depthFrame = _kinect.DepthStream.GetNextFrame(0);


protected override void Draw(GameTime gameTime)
    // do something with _skeletonFrame and/or _depthFrame
    // such as, draw it to the screen

So, if you're using XNA in tandem with the Kinect for Windows SDK, be sure to use the API as it was intended.  It will likely save you some debugging headaches later on.

My Info

  • View Brian Peek's profile on LinkedIn

Sponsored Ad

My Book

Sponsored Ad