Login | Register 

Kinect 2 questions

General discussion about anything TouchDesigner

Kinect 2 questions

Postby barakooda » Fri Aug 01, 2014 6:25 am

My first question:
How to align the depth\PlayerIndex\infrared output image 512:424 + lens distortion.
The color output image 1920:1080 with + lens distortion .

User avatar
Posts: 669
Joined: Fri Nov 27, 2009 5:08 pm

Re: Kinect 2 questions

Postby Leskos » Mon Aug 04, 2014 6:10 pm


The microsoft SDK has a class to handle transforming between the different coordinate spaces :


But I can't find the source code or any decent info on how it is implemented. You can get a rough approximation by keystoning manually (not much good for objects less than a couple of meters from the camera), but surely there has to be a better way.

EDIT : After a whole ton of searching around I'm done for the day, but I just found this post from the kinect team on the MSDN forums :

"We don't expose a transformation matrix for mapping between the two sensors. However, our IR and Depth images are all based off of the data from our TOF IR sensors and so the same calibration techniques that worked on the v1 sensor will work on the v2 one as well. Just remember that for best accuracy these calibration values should be generated for each sensor individually."

I never had a Kinect for windows v1, so haven't looked into this before, but a little searching about brought this post up, which mentions two possible tools for generating a transformation matrix between the IR and colour images

I'm off to a festival from tomorrow until Monday but if somebody could look into this, sort it all out, and post an example before I get back that'd be great ;)
User avatar
Posts: 78
Joined: Sun Oct 10, 2010 5:32 pm

Re: Kinect 2 questions

Postby vinz99 » Mon Sep 22, 2014 11:00 am

Thanks for the link, useful info.
What's working for me at the moment is to get depth and matching color in openframeworks and use directx texture sharing to access them in touch.

I feel it would be great if the calibrated color could be made available in touch though, as another option on the kinect TOP.

Else, there is this mysterious tdu.CalibrateCamera() used in camschnapper, help is pretty barebone, not sure if that would help.

From the wiki :
Returns a set of values based on the input calibration data. Still under development.
Posts: 375
Joined: Wed Apr 15, 2009 10:34 am

Re: Kinect 2 questions

Postby tetkin » Thu Sep 25, 2014 4:18 pm

If you used ReSharper or something similar to decompile microsoft.kinect.dll, you could see what they're doing in CoordinateMapper.
User avatar
Posts: 365
Joined: Thu Mar 08, 2012 6:32 pm
Location: Los Angeles, CA

Re: Kinect 2 questions

Postby barakooda » Sun Feb 22, 2015 7:22 am

Derivative doing such a great work but keeping it secret :-)

Camera Remap option
was added to Kinect top!
more or less its solves lots of issues and workarounds.

Well done Derivative !
User avatar
Posts: 669
Joined: Fri Nov 27, 2009 5:08 pm

Re: Kinect 2 questions

Postby vinz99 » Sun Feb 22, 2015 10:58 pm

Completely missed that. have to try it out but yes seems great!
Posts: 375
Joined: Wed Apr 15, 2009 10:34 am

Return to General TouchDesigner Discussion

Who is online

Users browsing this forum: No registered users and 10 guests