kerree / simple-openni

Automatically exported from code.google.com/p/simple-openni
0 stars 0 forks source link

Set "userCount" back to 0 #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The function "context.getNumberOfUsers();" counts the number of users, who are 
standing in the sceneMap. 

If there is one person, the value of the function increases to 1. If there are 
2 people, the value turns to 2. 

The Problem: If one or both people walk outside the tracked area, the value 
doesn't go back to 0. 

Version of used library: SimpleOpenNI-0.15-osx.zip, uploaded Mar 15
What is the expected output? 0 -  What do you see instead? - 1

Original issue reported on code.google.com by desperad...@gmail.com on 17 Mar 2011 at 9:19

GoogleCodeExporter commented 8 years ago
This is partially caused by the fact that the kinect keeps track of users that 
went off the camera field for a certain amount of time (default is 10 seconds) 
to be able to restore the user's id if this user comes back before this time is 
elapsed.
In the last version of OpenNI,NITE and avin2 Sensor Driver (Kinect Mod), you 
can specify this parameter in the GlobalDefaultsKinect.ini, change the 
parameter "ServerNoClientsTimeout" (don't forget to remove the ";" at the 
beginning of the line).

I said partially because i noticed that when a user  is not detected because 
he's too close or to far from the camera, the userLost event is actually 
dispatched and the getNumberOfUsers() change accordingly whereas when the user 
leaves the field of the camera by going to the left or right, this is when the 
user's id is kept and nothing is dispatched and getNumberOfUsers() doesn't 
change. It's not systematic but this behaviour is fairly noticeable.

Original comment by bkuperb...@gmail.com on 14 May 2011 at 11:57

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Dear,

i'm using Mappinect, a sw SimpleOpenni-based. I followed your suggestion,  to 
raise timeout. Chanaged  ServerNoClientsTimeout and reinstalled the openni and 
NITE (i'm using OpenNI_NITE_Installer-OSX-0.22.zip and 
SimpleOpenNI-0.22-osx.zip). With no results. Server timeout remains 10 sec.
What am i doing wrong?

michele

Original comment by michele....@gmail.com on 28 Nov 2011 at 2:05

GoogleCodeExporter commented 8 years ago
I have this same problem.
I tried to change the parameter but it still does not seem to change the 
problem. 
I cannot figure out a way to test wether the users are actually still in the 
shot being tracked or not.
Is there a function to manually reset the user count?

Original comment by filmmake...@gmail.com on 20 Feb 2012 at 6:05

GoogleCodeExporter commented 8 years ago
How many users can it track? 6?

Original comment by leyla.na...@gmail.com on 13 Jul 2012 at 7:28

GoogleCodeExporter commented 8 years ago
I have the exact same issue. 

My sketch only requires and only works with 1 user. It often creates a new user 
on accident, which screws up the sketch. I'd really love a function to be able 
to either delete users or reset the user count and re-establish a single user.

Original comment by jparro...@gmail.com on 27 Nov 2012 at 7:45

GoogleCodeExporter commented 8 years ago
Changing the ini file did not work. I am keeping track of it manually by using 
a global counter and updating it when there are SimeplOpenNi callbacks, using 
the onLostUser , onNewUser, onExitUser and onReEnterUser methods

Original comment by ankit...@gmail.com on 14 Dec 2012 at 9:54

GoogleCodeExporter commented 8 years ago
Hi everybody, i'm new user of SimpleOpenNI, i'd like to know how to use the 
'getNumberOfUsers()' method, because when i type this 
'context.getNumberOfUsers();' in the draw function the result is the crach of 
my java machine, did i do something wrong ??
 I need yout help thx.

Original comment by w.don...@gmail.com on 29 Jan 2013 at 1:59

GoogleCodeExporter commented 8 years ago
On my mac I found the file here, works like a charm!
/usr/etc/primesense/GlobalDefaultsKinect.ini
Must edit it as root.

Original comment by sigil...@gmail.com on 6 Jul 2013 at 1:53

GoogleCodeExporter commented 8 years ago
This is indeed causing me issues too.

Changing the kinect.ini file in windows actually is the time taken for how fast 
the onExitUser works rather than onLostUser

I just want to keep track of user 1 and if it detects anythign else to ignore 
the general openni callback methods. Im trying to use a global counter but it 
doesnt work reliably enough

Original comment by ashleybr...@googlemail.com on 18 Jul 2013 at 12:51

GoogleCodeExporter commented 8 years ago
Hi everybody, working with openni skd 2 on windows and processing. i wondering 
if the ServerNoClientsTimeout parameter is working with the new sdk as well, i 
couldn´t found it. I want do decrease the timeout... Thanks

Original comment by anlutz1...@gmail.com on 5 Feb 2014 at 10:58