OpenNI provides the function ConvertRealWorldToProjective
which lets you easily convert real world (x,y,z) joint positions, in mm, to a projected (x,y) position in pixels for a given viewport. This is really useful for drawing a 'skeleton' over the webcam feed.
Is this functionality exposed by ZigJS, either as a function or perhaps already converted somewhere? I can't find any mention of it in the docs, but I had luck with a previously undocumented feature with Zigfu in the past.
user.addEventListener('userupdate', function(user) {
var real = user.skeleton[zig.Joint.Head].position; // this is real world coordinate
// anything exposed by zigfu to convert to real world?
});
If not provided by Zigfu, does anyone know of a good JavaScript library that provides this sort of functionality?