User generator loosing user when using alternative view point

95 views
Skip to first unread message

Jules Olléon

unread,
Feb 3, 2011, 7:42:42 PM2/3/11
to openn...@googlegroups.com
I' m creating a point cloud combining RGB and depth, and I'm trying to add skeleton tracking.

In order to combine RGB and depth I do:
   g_DepthGenerator.GetAlternativeViewPointCap().SetViewPoint(g_ImageGenerator);

But when I do that the user generator gets unstable : it keeps loosing track of users.
When I don't change the view point it does work well.

Also, I tried to do:
    g_ImageGenerator.GetAlternativeViewPointCap().SetViewPoint(g_DepthGenerator);
instead but that doesn't seem to do anything (RGB and depth aren't correlated).

Is that known problems, or do I miss something?

Also note that the FPS is pretty low (about 15), I don't know if that's relevant (though that does make the calibration time much longer...)

stephane.lallee

unread,
Feb 21, 2011, 10:47:34 AM2/21/11
to OpenNI
I am running into exactly the same problem. When I swith my depth
generation to the imageGenerato view point then the user is
flickkering and never recognized.

I would have assumed something like :

this.depth.GetAlternativeViewPointCap().SetViewPoint(this.rgb);
this.userGenerator = new UserGenerator(this.context);

this.userGenerator.GetAlternativeViewPointCap().SetViewPoint(this.rgb);

but the second call to GetAlternativeViewPointCap tells me that the
operation has invalid arguments... :-\
it would have sound logical that the userGenerator view point need to
be aligend on the depth one...

stephane.lallee

unread,
Feb 21, 2011, 11:42:42 AM2/21/11
to OpenNI
After a bit of trial I came up witht he following solution to
stabilize the user detection.

Assuming that you are using the UserTracker.Net sample, I changed the
thread main loop to add :
this.context.WaitOneUpdateAll(this.depth);
this.userGenerator.WaitAndUpdateData();

This seems to work for me.

On 4 fév, 01:42, Jules Olléon <joll...@gmail.com> wrote:

makism

unread,
Feb 22, 2011, 2:14:46 AM2/22/11
to openn...@googlegroups.com
Thanks a lot for the piece of code.
This seems also to answer my problem i had posted to another thread.

Neil Brown

unread,
Feb 28, 2011, 4:51:40 AM2/28/11
to OpenNI
Hi,

I have exactly the same problem, but unfortunately stephane's solution
doesn't fix it. If I leave out the call:

g_DepthGenerator.GetAlternativeViewPointCap().SetViewPoint(g_ImageGenerator);

Everything works fine for the user tracking, but the depth and image
are noticeably different from each other. If I put in the above line,
the depth and image are perfect together, but the user tracker becomes
very unstable, suddenly stopping tracking users entirely when they
bang in the centre of the frame and nothing else has moved -- at which
point they have to move to be recognised as a user again, and then
recalibrate, but it's basically unusable.

Is there perhaps a way to have two depth generators (making one a
proxy?), one with this alternate viewpoint to line up the image, and
the other to support the user tracking?

Thanks,

Neil.

On Feb 22, 7:14 am, makism <mak...@gmail.com> wrote:
> Thanks a lot for the piece of code.
> This seems also to answer my problem i had posted to another thread.
>
> On Mon, Feb 21, 2011 at 6:42 PM, stephane.lallee
> <stephane.lal...@gmail.com>wrote:

Nestor Gomez

unread,
Feb 28, 2011, 7:07:43 PM2/28/11
to OpenNI
I am dealing with the same issue and I have a different theory. My
guess is that the user generator needs a minimum framerate to work
correctly. I started to notice this problem when my application became
more complex. I haven't fully tested yet, but my data points that
way.

Neil Brown

unread,
Mar 1, 2011, 8:57:42 AM3/1/11
to OpenNI
I think you might be on to something there. I altered my code so that
I take the current time just after calling context.WaitAndUpdateAll(),
then take the time just before I call it again, and print out the
delta between the two times. Whenever I lose a user, it is preceded
by taking > 1/30th second between calls to the update function. I'm
going to refactor my application so that it has less delay between the
calls in the hope that that will eradicate the problem.

Nestor Gomez

unread,
Mar 2, 2011, 6:07:10 PM3/2/11
to OpenNI

Do you find something about this error? I changed my code to run as
fast as it can but I am still losing users now and then.

Are you running on Windows? or Mac? What version? Are you using a C++
with OpenGL application, unity, flash o what?

I am running Windows 7, Unity with a DLL based on the UnityWrapper.

Thanks

Nestor

Neil Brown

unread,
Mar 2, 2011, 6:46:53 PM3/2/11
to openn...@googlegroups.com, Nestor Gomez
Hi,

My application sends the Kinect data out on a socket to a different
(Java) process. I used to run it with an OpenGL display (for debugging
as much as anything else), and my frames would take 10-30ms between
calls to processing the sensor. Presuming that ~33ms is the limit
between update calls to maintain 30 FPS, that was quite tight on
resources! Anecdotally, a lost user always followed a frame or two
where I took 40-50ms between calls to processing the data. I have since
been running it in headless mode, just processing the data and pumping
it out on the socket without visualising it. This (along with some
optimisation of my own post-processing code) brought my time between
calls to processing the sensor down to 2-5ms. Since then I haven't
noticed any problems with dropping users, it's been as stable as when I
first started using the sensor. This is using the C++ API on Ubuntu 32-bit.

Thanks,

Neil.

giota

unread,
Mar 3, 2011, 4:32:36 PM3/3/11
to OpenNI
I had the same problem and this code worked for me too:

context.WaitOneUpdateAll(depth);
image.WaitAndUpdateData();


Alternatively:
context.WaitOneUpdateAll(depth);
context.WaitAndUpdateAll();

but the first one seems to work better.

Thanks a lot for that suggestion!

--Giota

On Feb 21, 8:42 am, "stephane.lallee" <stephane.lal...@gmail.com>
wrote:
> After a bit of trial I came up witht he following solution to
> stabilize the user detection.
>
> Assuming that you are using the UserTracker.Net sample, I changed the
> thread main loop to add :
>                 this.context.WaitOneUpdateAll(this.depth);
>                 this.userGenerator.WaitAndUpdateData();
>
> This seems to work for me.
>
> On 4 fév, 01:42, Jules Olléon <joll...@gmail.com> wrote:
>
> > I' m creating a point cloud combining RGB anddepth, and I'm trying to add
> > skeleton tracking.
>
> > In order to combine RGB anddepthI do:
>
> > g_DepthGenerator.GetAlternativeViewPointCap().SetViewPoint(g_ImageGenerator);
>
> > But when I do that the usergeneratorgets unstable : it keeps loosing track
> > of users.
> > When I don't change the view point it does work well.
>
> > Also, I tried to do:
>
> > g_ImageGenerator.GetAlternativeViewPointCap().SetViewPoint(g_DepthGenerator);
> > instead but that doesn't seem to do anything (RGB anddeptharen't

Tomoto

unread,
Mar 5, 2011, 11:43:39 PM3/5/11
to OpenNI
Hi everyone,

I had the similar user tracking stability issue, and it has gone by
switching OpenNI/NITE/SensorKinect to the stable versions.

OpenNI stable: 1.0.0.23
NITE stable: 1.3.0.17
SensorKinect compatible with OpenNI stable:
https://github.com/avin2/SensorKinect/blob/4e91f689fc5c8320f920b2976abdd9b50ee1baf0/Bin/SensorKinect-Win32-5.0.0.exe

Hope this helps,
Tomoto

makism

unread,
Mar 8, 2011, 7:47:34 AM3/8/11
to openn...@googlegroups.com
The stable release does not have .NET bindings.

GooglyEyes

unread,
Apr 8, 2011, 12:33:59 PM4/8/11
to OpenNI

Hello everyone, first-time poster to this helpful group.
I'm also running into the dropped-user situation when using
SetViewPoint().
Using the different "update" strategy which worked for Giota hasn't
helped in my case.
I've also tried following Nestor's suggestion of speeding up the app
to give the generator more cycles. This also did not remedy the
situation for me, but of course I just might not have been able to
trim down the app enough to reach the sweet spot. I also tried placing
the generators' updates in their own specialized thread which does
nothing but update the generators, to no avail.
Tomoto's solution of using the "stable" builds may be a good option
for the project I'm working on. Though I'm running into an issue when
switching to the sable releases, but I suspect that may be my fault
for missing something about their installation or use. When using the
stable versions and running my app, the Kinect does properly light up
its red beam. However when someone walks in front of it it does not
detect the presense of a user. That is, it does not call the new-user
function registered via RegisterUserCallbacks(). Has anyone
encountered this before?

Thanks for any help,
- Rashid
Reply all
Reply to author
Forward
0 new messages