Kinect 2 questions

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 .



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 :wink:

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.

If you used ReSharper or something similar to decompile microsoft.kinect.dll, you could see what they’re doing in CoordinateMapper.

Derivative doing such a great work but keeping it secret :slight_smile:

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

Well done Derivative !

Completely missed that. have to try it out but yes seems great!