From Friday, January 17th 11 PM CDT (January 18th 5 AM UTC) through Saturday, January 18th 11:30 AM CDT (January 18th 5:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft Kinect Development SDK 1.0: Accessing element of KinectSensors collection.

Hello,

 

With the creation of the released Microsoft Kinect SDK, there have been some fundamental changes to how we can access the functionality of the Kinect.

Here is the example labview code from LabView hackers, that I am trying to modify for the new SDK.

http://labviewhacker.com/kinect.php (Attachment Initialize Kinect)

 

Now the issue I am having is as follows:

Previously the SDK accessed a Runtime object with a public constructor, this constructor then allowed use of such methods as initialize.

This follows what we can find at: http://www.i-programmer.info/programming/hardware/2623-getting-started-with-microsoft-kinect-sdk.htm...

 

Now wtih the new SDK the object I am trying to access is the static object KinectSensor, which as a collection of KinectSensors. 

I used this document to figure out how to do this: http://zone.ni.com/reference/en-XX/help/371361F-01/lvhowto/create_net_object/

 

For reference, here is how I need to initialize the kinect in the new SDK: http://www.i-programmer.info/ebooks/practical-windows-kinect-in-c/3725-getting-started-with-windows-...

 

Now the problem is, I can access the object KinectSensors, which is the static collection of all the kinects attached to my computer.  But I do not know how to access a single kinect out of that collection.  (As seen in the attached file initialize)

In this attachment, I can access the KinectSensors collection, but I do not know how to access a single element of that collection.

I wish this were as easy as accessing the first element in an array, but I'm afraid it isn't.  

 

Thank you for reading this, and please forgive my lack of knowledge on this subject.  I am learning C++ at the moment and have no experience working with .net.

 

Download All
Message 1 of 16
(4,194 Views)

Here's a little update for anyone following this.

 

I can access a specific Kinect sensor now, and I believe I should be initializing it correctly. 

My initialization sub vi is attached as well as what I have for my callback handler vi's.

This is early alpha software and I will hopefully be editing this tomorrow with a much more complete API.  But at least looking at this will help anyone who is working on getting the SDK 1.0 to work.

 

Message 2 of 16
(4,170 Views)

Sorry, I lost track of this.  I'll look over your work (tomorrow hopefully) with my own Kinect and see where it gets me.  Thanks for your efforts.  Perhaps, I can be of assistance after looking through your code.

The Colex Group
Lead Software Engineer
Certified LabVIEW Developer
0 Kudos
Message 3 of 16
(4,023 Views)

Please look at the attached files.  I have modified your callback vi's to both work (mostly).  Things are a bit cleaned up.  Run code.vi is a simple vi that does the initialization, pulls from the queues, and closes everything down, though it doesn't seem to close everything just yet.

 

On my machine, the images are duplicated and take up the top two quarters of the image control.  Does this behavior exist on your machine?

The Colex Group
Lead Software Engineer
Certified LabVIEW Developer
0 Kudos
Message 4 of 16
(4,010 Views)

Rather, this attachment.

The Colex Group
Lead Software Engineer
Certified LabVIEW Developer
0 Kudos
Message 5 of 16
(4,006 Views)