ofxMSKinect

Hi,

We’ve wrapped the Microsoft Kinect SDK for Windows into an add-on and put it on GitHub. There is an example project along with a readme describing how to use it. You will need the Kinect SDK installed and a Kinect. Please download and try out.

Note: There are projects for both Visual Studio and code::blocks. The code::blocks project may only work on debug and has an x86 path (as developed on 64-bit Windows) – just alter the project paths if you’re on 32-bit Windows.

URLs:

Regards,

Simon

very interesting! only a question : do you know if the SDK work with Windows vista?thanks

just want to say congrats on this work, and i’m super excited to see this functionality (mainly the MS skeleton tracker) made more accessible for the OF community! some situations absolutely demand that you don’t use the psi-pose, and so far the MS tracker is the only one that provides that option.

Nice work guys! Does this include support for the audio capabilities of kinect?

@outsidecontext The guys at Matchbox (Simon’s company) are planning to integrate this at some stage. They’re also open to the community contributing this and any other additional functionality.

Great work on this Simon. I’ve encountered a problem. I want to be able to track the 2 available skeletons and disregard the additional 4 users represented by points.

At the moment I’m stepping in and out of the kinect area and experiencing a"ghosting" issue - see users 1, 2 and 3 (r, g and b) below. I’m looping through all the available skeletons in the tracked_skeletons vector and using the ofVec3f values of each joint to draw ofSpheres. I’m printing out a load of user data from _ofMS_SKELETON_DATA struct and seeing that there are multiple skeletons in the tracked_skeletons vector even when nobody is being tracked. This number doesn’t go down and can reach a maximum of 6. The id/flag values and active skeleton appear to be fairly random. Is there a way of figuring out which of these skeletons are currently active, i.e actual users?

@kalwalt Vista is not supported as the Microsoft Kinect SDK requires Windows 7. From their readme, requirements are:

Supported Operating Systems

  • Windows 7 (x86 and x64)

Hardware Requirements

  • Computer with a dual-core 2.66-GHz or faster processor

  • 2 GB RAM

  • Windows 7-compatible graphics card that supports DirectX 9.0c

  • A retail Kinect for Xbox 360® sensor, which includes special USB/power cabling

@jamesalliban Are you seeing the same issue with the example project we provided? If possible, can you send a code fragment of what you’re doing please?

@kylemcdonald @outsidecontext Thanks very much. No audio support as yet, our first goal was to get skeleton support up and running.

I don’t see that issue with your example. I thought that was using ofVec2f data. I’ll have a good look through that when I get home.

It’s a big project but I’ll try to explain my process.

I have a UserManager class which uses the firstDevice->NumberSkeletonsTracked() value to loop through all the items in the tracked_skeletons vector.

At the moment I have 6 User classes to account for the current maximum amount of tracked skeletons.

User::draw()

  
      
    // jointPosition is a vector acting as a sort of hash table that contains all ofVec3f objects for this user.  
    // This is formed in update()  
    for (int i = 0; i < (int)jointPositions.size(); i++)  
    {  
        ofVec3f vec = jointPositions[i];  
        vec.z *= -1;  
        ofPushMatrix();  
        ofTranslate(vec * 50);  
        ofPushStyle();  
        ofSetColor(debugColour);  
        ofSphere(1);  
        ofPopStyle();  
        ofPopMatrix();  
    }  
  

Hope this is enough. I can email the project to you if nothing jumps out.

Ah, my mistake. It seems I still had the previous version of the addon cached in Code::Blocks… I just needed to clean the project.

[quote=“simonhr, post:7, topic:7282”]
@kalwalt Vista is not supported as the Microsoft Kinect SDK requires Windows 7. From their readme, requirements are:

Supported Operating Systems

  • Windows 7 (x86 and x64)

Hardware Requirements

  • Computer with a dual-core 2.66-GHz or faster processor

  • 2 GB RAM

  • Windows 7-compatible graphics card that supports DirectX 9.0c

  • A retail Kinect for Xbox 360® sensor, which includes special USB/power cabling

[/quote]i saw this … i hoped that wasn’t real. i will found another pc with windows 7 . thanks for the info and congratulation for the great work!

Has anyone used this? Any feedback?

Hi, thanks for this, I’m excited to get it to work. I have an issue however. I have spent most of my time developing in oF in Xcode and Mac OS X so I don’t have a ton of experience on the Windows side. The example application is compiling successfully, but i get an error immidiately saying that my computer does not have MSRKinectNUI.dll.

Any ideas? Maybe I need to switch a setting in Visual Studio so that it knows to build in 64bit?

Thanks for any help you can provide.

You have to download and install the following:

Latest DirectX
Visual Studio 2010 (Visual C++ is fine if you use Code::Blocks)
Kinect SDK

You should be fine if you install it in this order.

More info here:

http://research.microsoft.com/en-us/um/redmond/projects/kinectsdk/docs/readme.htm

I would recommend using Code::Blocks which I find easier than VS2010. There should be examples for both.

Hey!
I’ve been trying out ofxMSKinect for a few days now trying to port some old code I had made on ofxKinect. I had started a thread to get some of the basic functionality working. Here it is:
http://forum.openframeworks.cc/t/get-depth-pixels-from-ofxmskinect-into-ofxopencv-in-007/8047/0

The problem is that I never managed to turn the Depth Information into information that openCV can read and turn to blobs, either using getDepthPixels() or getofDepthPixels() which is really weird and I tried many different approaches (using ofPixels, ofImage, ofTexture, Unsigned Chars and witchcraft rituals where I scream insults at the compiler).

Could anybody help me out with this? It is not urgent or anything, but I seem to have stumbled upon something in which I cannot find the errors.
I’ve attached the last project that worked. It is supposed to be a simple merge between the standard opencvExample that comes with oF 007 and msKinectExample that comes with the addon, so nothing fancy.

BTW, thank you simonhr for the addon! =D

ofxOpenCvmsKinectExample.zip

Hi guys,

Thanks for your great work, the add-on is working great with the beta version of the SDK.
Actually my question is related to that : Is there anyone who is working to port this add-on to the release version of the SDK ? I tried to mess little bit with it but the API seems to have change deeply. So before going further I was wondering if anyone has some updates on that…

Thanks.

Hi gauthier

I’m looking to update the addon to work with the new SDK and Kinect for Windows. This should happen at some stage in the next few weeks. I’ll post here when it’s complete.

Have you a prevision of the Updated ofxMSKinect to the release Kinect SDK?
Thanks,

and congratulation for the work …

I didn’t update the addon in the end because I learned that sadmb had already done this in a separate addon called ofxKinectNui.

Here’s the Git repo:

https://github.com/sadmb/ofxKinectNui

And the discussion:

http://forum.openframeworks.cc/t/ofxkinectnui:-an-addon-of-kinect-sdk-for-of/8360/0

I’ve been using it for the last week or so and it seems to work very well. It even has audio integration.