Entries:
Comments:
Discussions:

Loading user information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading user information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Skeletal "Fingerprints" with the Kinect v2

Mike Taulty, Coding4Fun Friend, has written up a great development post on the Kinect for Windows v2...

Windows 8.1, WPF, Kinect for Windows V2 and (Not Quite) Skeletal Fingerprints

This post is just to share some code that I wrote quite a while ago for fun.

At Microsoft’s UK campus there are some corridors that have gates which allow people to freely walk in one direction but which only allow people with the right ID cards to go in the other.

This set me wondering whether it might be possible to develop code with the Kinect for Windows V2 which monitored people walking towards the camera and;

  1. Took skeletal measurements as they approached the camera to build up average ‘limb lengths’ based on some set of limbs and measurement counts that can be configured.
  2. Grabbed a head and shoulders photo of each person based on knowledge of where their head and shoulders are within the camera’s view.
  3. Stored both of (1) and (2) in the cloud using some configurable table and blob storage.
  4. Scanned previously stored measurements in the cloud to determine whether a person of very similar ‘shape and size’ has been previously seen based on some configurable tolerance value.
  5. Ultimately, opened the door based on recognising the user’s skeleton.

Now, in truth, I’ve never really got this to work I’m not sure whether the idea of a ‘skeletal fingerprint’ is a flawed idea in the first place but I got way too many false positives to consider asking Microsoft to use my new system for their security but I had some fun in putting it together.

However, this was prior to the arrival of Microsoft’s Cognitive Services and I may revisit the code in coming weeks/months to see if I can make a better attempt at it in the light of those new services coming along as perhaps I can combine my not so successful idea of ‘skeletal fingerprint’ with an additional call to Cognitive Services to do facial identification and produce a better result than I previously did.

...

What’s with the Weird Code Structure?

The structure of this code is a bit unusual in that I wanted to be able to build out both a WPF application and a Windows application from the same code. The Windows application is a Windows 8.1 app rather than a UWP app because there isn’t a Kinect for Windows V2 SDK for UWP and so this code targets Windows 8.1 but will, naturally, run on Windows 10.

The Kinect for Windows V2 SDK is structured such that, with one or two conditional compilation statements around namespaces, it’s possible to write the same code for WinRT and WPF and so that’s what I set out to do although it does mean that I haven’t (e.g.) used something like Win2D for some drawing because Win2D only exists in WinRT, not in WPF.

...

How Is It Configured?

There are elements of configuration needed here whether running the WinRT app or the WPF app. The default configuration lives in 2 files;

...

What Does Running the App Do?

I can run either the WPF application or the WinRT application and (as long as I’ve got my Kinect for Windows V2 camera plugged in) I’ll get a video (or IR) display like the one below.

...

image

...

Wrapping Up

I’ve had this code for a long time but have never written it up so I found a few spare cycles today to do that.

It was built 100% ‘just for fun’ but I thought I’d share in case anyone else was interested or wanted to take pieces of it and improve it Smile

What I’d perhaps like to do next is to extend this by adding in some use of facial identification via Cognitive Services to see if I could build a system that worked a little better by using a combination of skeletal measurements with facial identity such that both mechanisms were used to determine identify. ...

Project Information URL: https://mtaulty.com/2016/07/18/windows-8-1-wpf-kinect-for-windows-v2-and-not-quite-skeletal-fingerprints/

Project Source URL: https://github.com/mtaulty/KinectBodyMeasurement

Contact Information:




Tags:

Follow the discussion

  • Oops, something didn't work.

    Getting subscription
    Subscribe to this conversation
    Unsubscribing
    Subscribing

Remove this comment

Remove this thread

Close

Comment on the post

Already have a Channel 9 account? Please sign in