Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Is there a wrapper for Microsoft's Kinect SDK yet?

Author
Message
WickedVixen
19
Years of Service
User Offline
Joined: 28th Mar 2007
Location: New Brisbane, Utopia Prime, VGC GHQ
Posted: 18th Jun 2011 18:26
Looking forward to having someone produce a wrapper for DBPro and DarkGDK.

Here's the download link for this AWESOME peripheral's goodness...
Please note: the file is an .MSI file.
(Reading the Requirements, it states Visual Studios 2010, but I know there's ample room for a good wrapper!)
http://research.microsoft.com/en-us/um/redmond/projects/kinectsdk/

I hope someone jumps on this and starts the development... ^_^

Here's hoping!
CHEERS!

Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 18th Jun 2011 21:35
It won't be long.

WickedVixen
19
Years of Service
User Offline
Joined: 28th Mar 2007
Location: New Brisbane, Utopia Prime, VGC GHQ
Posted: 1st Jul 2011 21:27
I can't wait!

GregA
15
Years of Service
User Offline
Joined: 21st Jun 2011
Location:
Posted: 1st Jul 2011 22:51
I would be happy to buy a DBPro Plug in if that motivates anyone.
WickedVixen
19
Years of Service
User Offline
Joined: 28th Mar 2007
Location: New Brisbane, Utopia Prime, VGC GHQ
Posted: 3rd Jul 2011 03:35
@GregA-- Why, if the Kinect SDK is FREE from Microsoft (C++ Visual Studios 2010)?

Hockeykid
DBPro Tool Maker
18
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 3rd Jul 2011 05:06
The license states it's non-commercial only, though if someone made a DBPro plugin I'd still love to play around with it.

WickedVixen
19
Years of Service
User Offline
Joined: 28th Mar 2007
Location: New Brisbane, Utopia Prime, VGC GHQ
Posted: 4th Jul 2011 06:35
That's part of the reason why I started THIS thread...
I want a nice DBPro/DGDK wrapper for it for some stuff I'm toying with.

I know hundreds of other hobbyists would love to use the tech for motion capture maneuvering in dungeons/FPS games and such... (Maybe a nice plug-in for FPSC would also be in the doing... LOL)

Visigoth
21
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 4th Jul 2011 15:40
I have one. And I've been playing with it off and on for about a week. I'm most interested in the depth camera as a possible 3d scanning device to build meshes. I ran some numbers, and, if my calculations are correct based on the specs of the Kinect, at the maximum distance the Kinect depth cam can read, which is 4000mm, it should "project" a grid with horizontal and vertical spacing of roughly 13mm, or, .5 inch, at 320x240 resolution. The docs are vague about if 640x480 is supported on the depth cam. As for skeleton tracking, the demo is kinda slow. The color cam and depth cams have no problem doing 30fps, on my machine, but as soon as tracking starts it is knocked down to 12-15. But it could be because they have all three things going on at once and how they draw the skeleton. Basically, data is returned as frames of images, or, depth data, stored in a buffer. HOW to get that back into DBPro is the problem. I'm thinking if a memory address can be returned, maybe it could be read directly. Anyway, I'm trying to see if I can get the basics working in a .dll, like initialize, open stream, and shut down.
Admiral MH
15
Years of Service
User Offline
Joined: 10th Feb 2011
Location: TX, USA
Posted: 4th Jul 2011 20:01
Well you're in luck, here is a link to the thread.

Though, this does not use the Microsoft Kinect SDK, it uses CL NUI Platform SDK. So I don't know how reliable it is, and since I don't have a Kinect myself I have not been able to test it. At least it's good for playing around with until a wrapper is created with the official SDK from Microsoft.

Visigoth
21
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 4th Jul 2011 21:52
that thread is locked, but, if you do attempt to use that .dll, keep this in mind, from the Microsoft SDK:

Controlling the Sensors
 All control of the Kinect sensor is through the APIs that are provided in this SDK Beta.
Caution If you use any other mechanisms to control the Kinect sensor, the sensor could become irreparably damaged.
 The tilt mechanism in the sensor array is not rated for frequent use. Your code should not make calls to change the camera angle more than once per second or more than 15 times in any 20-second period.
Warning You should tilt the Kinect sensor as few times as possible, to minimize wear on the camera and to minimize tilting time. The camera motor is not designed for constant or repetitive movement, and attempts to use it that way may cause degradation of motor function. This Beta SDK limits the rate at which applications can tilt the sensor, to protect the Kinect hardware. If the application tries to tilt the sensor too frequently, the runtime imposes a short lockout period during which any further calls return an error code.
Visigoth
21
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 10th Jul 2011 10:09 Edited at: 10th Jul 2011 10:12
I've been playing around some more. I got impatient with trying to write a .dll, so, I decided to just write a C# app that would capture a frame of depth data and write it to a flat file. Then, I wrote a DBPro app to read in the depth data and apply to a premade mesh, very similar to how the USGS stuff was done. Here is the rub. There are 3 resolutions for depth data, 80x60, 320x240, and 640x480. So far, I'm just playing with 80x60, which is pretty crude, but you can see the outline of a person. At 640x480, in my c# app, I was messing with a color histogram formula, and, I could see the wrinkles in my pants! Problem is, at 640x480, that would be an 8x8 grid of 80x60 meshes, or, a single mesh with 64 limbs. The C# app will write out the entire 640x480 data no problem. I have to revisit my USGS file splitter functions, as they will surely come in handy now. If anyone is interested in the C# app or the DBPro app, let me know, and I'll post them up.

edited to add:
OH, I almost forgot. I don't see why I couldn't modify the c# app to also write out skeleton positions, for motion capture. It would take a little work, but, its doable. And if you had a premade skeleton with the same rigging, well, you know.
Visigoth
21
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 21st Jul 2011 14:16 Edited at: 21st Jul 2011 14:17
just thought I'd post a screenshot of an 80x60 scan from the Kinect, converted to a mesh in DBPro. Something I learned about the Kinect and the depth values it returns. You can't just go at it like a terrain. With terrain, height values are measured directly above each equally spaced point. With Kinect, the distance returned is actually a ray cast from the center of the Kinect. Its up to us to convert the angles based on the FOV and angle of the ray, which I just figured out. When you see the screen shot, it should be pretty obvious how it works. And since this just a 80x60 scan, and Kinect can go up to 640x480, I see ALOT of potential with this thing. I just wish DBPro supported .obj files
Visigoth
21
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 21st Jul 2011 14:28
for comparison, here is a screenshot of how it looked when I tried to do it like a terrain
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 24th Jul 2011 12:03
Can it do that in realtime? (Or rather can DBP do it in realtime) as it still looks kinda cool!

My signature is NOT a moderator plaything! Stop changing it!
Visigoth
21
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 26th Jul 2011 14:30
Not yet in DBPro, until someone writes the wrapper, hint hint. But I just got DarkGDK.net, and I'm going to try to hook it up in c#.
WickedVixen
19
Years of Service
User Offline
Joined: 28th Mar 2007
Location: New Brisbane, Utopia Prime, VGC GHQ
Posted: 8th Aug 2011 09:12 Edited at: 8th Aug 2011 09:14
The differences between C++ (DarkGDK.NET) and C#.NET are not too dissimilar! Porting one into the other (the C# stuff to C++ for DGDK) might need a little tweaking, but knowing that with C#, most of the dependencies are covered for you (as well with XNA 4.0).

Again, the only issue would be the wrapper, and for me, that's going to be the HARD part-- wrappers were never that easy to do considering how I wanted everything in them!

-spoiler alert-


Please assist!
Quote: "It'll be bigger than a microchip!"
- Dr. Peter Venkman, Ghostbusters


Login to post a reply

Server time is: 2026-07-10 15:31:51
Your offset time is: 2026-07-10 15:31:51