diablodale/jit.openni

output_skeleton_orientation does not work

Closed this issue · 5 comments

With OSX 10.6.8, Max 5.1.9, version_jit.openni 0 8 6, version_openni 1 5 4 0 :

Hi,

After a message [output_skeleton_orientation 1, skeleton_format 0], the 9 orientation values are always 0, example : -215.652969 -198.375854 2670.875977 0.5 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.

How to retrieve orientation values ?

Thanks !
_TG

I continue to look into this. I have not been able to repro the problem you are experiencing so far.
Instead, from what you write above, it could be correct. Why do it write this....?

NITE (the part of the OpenNI software that detects joints) needs to be able to identify the joint and its connection to other joints to compute orientations. The line of data you write above tells me that OpenNI is not certain of the position of the joint (its joint confidence is 0.5). 0.5 confidence means that it doesn't see the joint but is estimating it based on other joints it sees and a general understanding of how a human skeleton is connected together. Given its 0.5 (low) confidence in joints, having zeros for orientations is very understandable. Also notice that the confidence in the orientation is zero itself (that confidence is the last digit). You should always ignore values if the confidence of those values is zero. You can do this in your own patcher or you can increase the confidence filter attributes to match your desired confidence. This is explained in the wiki.

Would you please try again the demo patch I provide and be sure that you are standing in full view of the kinect. Make sure your whole body is seen. And then check if you are getting position and orientations.

I have seen one additional thing (difficult to repro) and believe it is related to closed issue 3
#3

NITE does not calculate all 24 joints that OpenNI exposes through the API. Reference issue 3 or the NITE documentation.

On the unsupported joints, I sometimes (not always) see some random values left in memory. It could be just memory that wasn't set to zero by NITE for joints it doesn't support. I recommend you ignore any joints which are not supported by your skeleton engine. And because OpenNI has abandoned their v1.x API, then NITE will be the only skeleton engine that ever exists for OpenNI v1.x.

I think you will have good results by setting the position_confidence_filter=0.5. This should remove all the joints that are unsupported. You could also set the orientation_confidence_filter=0.5, however you might filter out too many joints (often it cannot determine the orientation of feet yet can see or estimate their position).

Please try this and reply back here with your results.

While waiting on your results, I found a way to programmatically determine which joints NITE supports. The code change for this will be in v0.8.7 and greater versions. Until then, you can use the position_confidence_filter=0.5 as I described above.

Also, the official NITE Algorithm.pdf file in section 3.3.2 writes that the lower parts of the arm (aka the hand) and the leg (aka the foot) do not reliably determine the orientation. They write that they set foot=knee and hand=elbow. But they didn't. So you could do that in your own code. I also recommend reading sections 3.4 and 3.5 to understand the significant limitations of orientation data.

Thanks for your answers !
I have never been so deep in the NITE official documentation. And of course, there is no orientation for hand... it works for head, but not for hands...
I will take a look on section 3.4 and 3.5 !

I am going to close this issue. A newer version of jit.openni is available which will not output joints that are not supported by NITE. In addition, you can use the confidence values for the joints and orientations you do receive to filter out what are good/poor values.

If you find future problems on this same topic/issue, please re-open this same issue and we can investigate more.