dp.kinect2 – Body Relative joint positions

Harry's icon

Hi everyone

I have setup some installations in the past with Synapse and Ableton. However I have now upgraded my Kinect to v2 and laptop with the intention of creating a better more accurate installation. Obviously Synapse is not compatable with the Kinect v2 so I have been looking for alternatives to send osc data into my Ableton Live project.

dp.kinect2 seems to be a very impressive patch, thank you creator, however I have what is probably a very newbie question. Synapse use to be able to send body relative osc data. So the x,y,z position of the hands or other joints from the body center. I have read the dp.kinect2 docs and haven't found anything mentioning the possibility of this in the dp.kinect2 patch. Is someone able to confirm this for me?

I am sorry if this is a really obvious and if I have missed something in my reading.

Thank you

diablodale's icon

Good news. I'm the author of dp.kinect and dp.kinect2. Both of them provide joint coordinates with a coordinate system centered on the Kinect itself with +Z moving away from the sensor. https://msdn.microsoft.com/en-us/library/hh973078 has a picture of this and its valid for both the Kinect v1 and v2 sensors.

You are seeking something relative...a new origin. Seems you want to have "body center" as the new origin. You can achieve this yourself (sample patch is below) with some math objects in Max and the reference in my wiki https://github.com/diablodale/dp.kinect2/wiki/Message-based-Data

I have designed my externals to always output the user location messages before the associated skeleton joint locations. You could route the "body center" message user id x y z q and use its xyz value as a new origin. Then using subtraction, alter the joint xyz coordinates that follow that message.

You could do it with (route), (zl.slice), and (vexpr). The below patch is a quick example. There are more elegant ways and the specific method would depend on your needs. What they all have in common is the vector math done with (vexpr).

Max Patch
Copy patch and select New From Clipboard in Max.

Harry's icon

I can't thank you enough for you reply, it has been really helpful. Also the sample patch you supplied has been great as well. I have actually bought a dp.kinect license now, due to the great patch and your aid, and can't wait to get this all running.

I really appriciate the time and help you've given so thank you again! And sorry for such a delayed reply, I had managed to convince myself I had replied not realising I hadn't till now.