Urgent - need way to deal with changing user ID output from kinect

Hey. I’d be much obliged if someone could offer assistance on this. Could really do with sorting this for a project ending today.

One of the outputs from the kinect openni drivers is a spread of active user IDs (unique integers) and active user body position (xyz).

I’m using this postion to accumulate a value based on how much the user has moved. The ID can be a spread of up to 4 values (if there are 4 users, I’m limiting it to 4) and if a user leaves, the spread size can change, meaning a user’s position in the spread can change, as will their position in the other spread. This results in the values I’d been accumulating (using frame difference and and a framedelay) get messed up.

I need to somehow (I think this is correct), when a user id slice value changes -

  • check to see if that user ID is still in the spread at another position

  • if it is, change the position of this slice to it’s old position

  • if it’s not, replace it’s position with either a new user id slice that has appeared, or if there are none, a dummy ID slice, to ensure that any existing ID slices above this one do not change spread position

Can anyone help?..

Posting (a simplified version of) your patch, might speed things up.

Hi Bjoern. Vux fixed me up a solution. I’ll share it shortly.

Apparently this is similar to a common problem encountered when tracking multiple fingers using a touch screen, and may be useful for a variety of problems.

@ mrboni, vux: I have to fix a similar problem. Can you share the solution?


indeed, a general solution for this kind of problems would be … awesome

quote sebl

quote too
Any tip on how to get this problem solved would be very helpful

Yow. Sorry I missed this before.

Attached is a plugin from vux which I hope he wont mind me posting

Let me know if you need any help using it (10.7 kB)

vvvvery useful! Thanks guys!

Could also be useful for this problem:

BIG VUX… no text …

thanks a lot!!

this came in very handy while implementing a similar case! :)

that one could be useful, too

(perhaps needs a little rewrite (touch > 3DPos)

absolutely! i actually used both ;) (could very well be combined into one plug easily, but had no time to do it properly)

you combined both? ah, then i didn’t understand vux’ plugin. can you provide a demo/helppatch/whatever?