Kinect and player index

Hey all,

I’m using the Kinect CHOP with the v2 sensor to control some interactive signage. It’s set to 1 player MAX and so I’m only using world position data from p1.

If somebody else is in the field of view of the Kinect, and p1 steps out of the scene, I’d like that person to take over control (but not until p1 has stepped out). At present, if p1 steps out, the second person doesn’t take control unless they step out and there’s nobody else in shot, and then step in again, then assuming the p1 position.

i’m guessing that the kinect is continuing to track up to 6 people regardless of the max players value in the CHOP.

Does anybody have a method to transfer control of P1 to the next indexed player when P1 leaves the shot?

Thanks in advance!

a.:

Hey guys come on does anybody found a solution after 3 years?

Hi,
If I remember correctly there are p1/id (p2/id, …) parameters in Kinect CHOP that have a positive value when the person is in the Kinect range and zero when a player is outside.
Therefore, you can check if those values are zero using Python or some combination of logic CHOPs and take data from the first player with a non-zero ID.
I do not have another person to check live with Kinect but I see in our project that we use similar conditions.
I hope it will help, if not I could try to elaborate on it more later.
Best,
Milten

Hey @OscarTD

Remember that the Kinect was abandoned by Microsoft is not made anymore and the v2 is from 2014.

The “issue” here is that the Microsoft kinect library tries to retain the IDs of the people in the scene. This is probably a smart move on their part and not something Touchdesigner needs to “solve”

Be open to finding your own solutions in Touchdesigner or maybe this software is not for you.

Hey @OscarTD I’ll have to dig out my old code (not entirely sure i still have it so bear with me).

I did solve it eventually but as @harveymoon says, I had to roll my own solution. From what I recall, I ended up tracking all player indexes and then using some comparator logic in a Select CHOP to choose the player index data whose z index was closest to the camera, and then promoting that data stream to the control component.

If I can find the logic I built I’ll post it here but that approach should get you where you need to get to.