LOST User Kinect

408 views
Skip to first unread message

sottostee

unread,
Sep 30, 2012, 7:17:30 AM9/30/12
to openn...@googlegroups.com
Hi,

I have a problem with: "How many time kinect needs to lose an user already detected?"

I wish kinect MUST to lose an user already detected when the user self leaves the field of view!

But in UserTrackr.java of OpenNI, kinect lose an user already detected NOT just the user self leaves the field of view but when the event is been triggered (sometimes also not few seconds).

Any ideas?

Thanks in advance

Alexander Khovansky

unread,
Oct 1, 2012, 7:47:08 AM10/1/12
to openn...@googlegroups.com
Can't say about Java, but in C/C++ interface you can subscribe to "User Exit" event (UserGenerator::RegisterToUserExit). It is generated when user has left the field of view but is not lost yet. There is complementary event "User ReEnter" (UserGenerator::RegisterToUserReEnter).

By the way, there is one quirk about user exit. Sometimes this event is not generated, but user mask (pixel map) returned by UserGenerator::GetUserPixels has no pixels, so user is in fact beyond the field of view. I noticed that when this happens, user never re-enters again and is lost after some time.

And keep in mind that NITE recycles user IDs. If you had a user with ID=1 and it have been lost, and you see ID=1 again, it is _another_ user (as NITE thinks).

From "NITE Algorithms.pdf" from NITE distribution:
If the user is not visible for more than 10 seconds, the user is considered lost and
an event is generated by the API. Their ID is freed and they will be given a new
ID if they are re-detected. Since IDs are recycled, another user may get the lost
user‟s ID at some point in the future. It is therefore important to catch this event
 and inform the pose tracker to stop tracking the old user. This will ensure that
when a user with that same ID is re-detected, the pose tracker will request re-
calibration on that user.

Sérgio Passos Jr.

unread,
Oct 1, 2012, 9:32:09 AM10/1/12
to openn...@googlegroups.com
I created an array with the users, I add the UserID to this array on the "NewUser" and "ReEnter" events, and take that ID off the array on "UserLost" and "UserExit" events (if exists). To check if there is a user at all, just look if there is any in your array. If you leave through the left or right sides, or approaching the sensor, it will generate the "UserLost" immediately. If you leave by going too far from the sensor, it will wait for the 10s to generate the "UserExit" (and never generate UserLost).

- Sergio

2012/10/1 Alexander Khovansky <khov...@cvisionlab.com>

--
You received this message because you are subscribed to the Google Groups "OpenNI" group.
To view this discussion on the web visit https://groups.google.com/d/msg/openni-dev/-/VU8lSQ0m99wJ.
To post to this group, send email to openn...@googlegroups.com.
To unsubscribe from this group, send email to openni-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/openni-dev?hl=en.

Alexander Khovansky

unread,
Oct 2, 2012, 4:07:16 AM10/2/12
to openn...@googlegroups.com
Behavior which I observe (with Kinect) is more logical. If user leaves through either side or goes too far / too close, the "exit" event is generated, and 10 seconds later, if user has not returned - the "lost" event.
The way to cause tracking disruption is to make big changes in the whole scene - quickly approach the sensor very close or quickly turn it. Then all users are lost immediately and some false detections can appear.

Sérgio Passos Jr.

unread,
Oct 2, 2012, 4:42:21 PM10/2/12
to openn...@googlegroups.com
Sorry about the mistake on the "user lost" and "user exit" I made, Alexander is right, but the logic applies.

- Sergio

2012/10/2 Alexander Khovansky <khov...@cvisionlab.com>
To view this discussion on the web visit https://groups.google.com/d/msg/openni-dev/-/B_DBXJnKHgAJ.

sottostee

unread,
Oct 5, 2012, 5:58:06 AM10/5/12
to openn...@googlegroups.com
Thank you very much for the reply.
it's just what I need.

But i have another question: can i reduce or increase the time kinect takes to lose an user?
For example: I wish kinect considers lost an user is not visible for more than 5 seconds (and not 10 seconds).
Can I this?

Best Regards

Alexander Khovansky

unread,
Oct 5, 2012, 7:11:09 AM10/5/12
to openn...@googlegroups.com
Here Lior Cohen said "there is no way at the moment to set/change the timeout value or remove it altogether". I have not heard that it changed since then.

But you can simulate smaller timeout yourself.

sottostee

unread,
Oct 5, 2012, 11:10:54 AM10/5/12
to openn...@googlegroups.com
Thanks for the reply
I think the same if i use an object Timer that after an interval of x(<10 seconds) seconds triggers an event "lost user id" for the kinect system.

But, how to trigger an event of this? How to intercept kinect system?

thanks in advance

Bhavna Agarwal

unread,
Oct 5, 2012, 11:53:27 AM10/5/12
to openn...@googlegroups.com
use "exit" event for this

--
You received this message because you are subscribed to the Google Groups "OpenNI" group.
To view this discussion on the web visit https://groups.google.com/d/msg/openni-dev/-/aVNKs0qPn5IJ.

Alexander Khovansky

unread,
Oct 5, 2012, 12:11:55 PM10/5/12
to openn...@googlegroups.com
You cannot trigger OpenNI event (AFAIK).
But you could maintain your own list of active users with mapping OpenNI_ID -> my_ID. Consider user lost after 5 seconds of inactivity, but continue to watch its events. If it reenters, consider it new user and assign new my_ID.

sottostee

unread,
Oct 5, 2012, 12:16:45 PM10/5/12
to openn...@googlegroups.com
unfortunely exit event don't solve my problem...
Because, supposed that an user (already detected) do quick movements and he has mapped with a (new) id, his "old" id remain until a 'lost' event is triggered.

And i don't want this happen.
I wish decide the time within which an user is considered "lose".

Sérgio Passos Jr.

unread,
Oct 10, 2012, 1:17:34 PM10/10/12
to openn...@googlegroups.com
Alexander Khovansky previously wrote in this discussion: "By the way, there is one quirk about user exit. Sometimes this event is not generated, but user mask (pixel map) returned by UserGenerator::GetUserPixels has no pixels, so user is in fact beyond the field of view. I noticed that when this happens, user never re-enters again and is lost after some time.


And keep in mind that NITE recycles user IDs. If you had a user with ID=1 and it have been lost, and you see ID=1 again, it is _another_ user (as NITE thinks)."

I suggest checking the UserPixels as well, if there is none you can wait or consider him lost immediately. This should work even when the user is detected as a new user because he moved too fast. To workaround the ID recycling, maybe you could keep track of the user position, if he is detected far from the "lost" position, it might be another user who entered the scene but used the same ID.

To be honest I have to improve this user control on my app as well, I'll try the UserPixels idea.

-Sergio
Reply all
Reply to author
Forward
0 new messages