assurance-tunnel
assurance-tunnel
assurance-tunnel
assurance-tunnel

[ANSWERED] send trigger if no number change detected - if - else scenario



  • Hi, 

    I am stuck on a, I think, pretty simple problem, but somehow can't wrap my head around it, so maybe you have a solution! I am tracking with OpenNI (kinect, windows) and I basically want to trigger the reset field in the OpenNI Actor when the values in the skeleton decoder are not changing anymore. (It's for an installation and I noticed that the tracking has a tendency to get stuck on a fixed object if a body leaves the tracking area, which I want to avoid). So I basically need a way to trigger the reset field, when the numbers (i.e. the 'torso x' value) in the skeleton decoder actor are not changing anymore... any suggestions which actor to use? (I tried something with trigger value, comparator and envelop generator, but yeah.... got stuck...). Thanks in advance!


  • Tech Staff

    @ari

    actually you only need a trigger delay. The value of the torso x goes into the "trigger in" of the "trigger delay" actor and the output goes to the reset input of the OpenNI Tracker. If you set a delay of 3 seconds and the torso x value makes any changes in these 3 seconds the trigger will never reach the output because the 3 seconds restarts at every trigger. as soon as there is no change in the value for 3 seconds the trigger will go to the output.

    Best Michel



  • Hi, thanks for the fast reply!

    I tried that, unfortunatly it isn't the solution for all the scenario. What happens sometimes is that while walking out the kinect doesn't loose the body, but just applies it to a piece of the wall, here I observed two scenarios: 1. through, I believe light changes it believes to detects movements and sends the trigger, 2. even if no movement is detected and the numbers don't change it still sends out the trigger signal...



  • the first scenario I actually now had for the first time.... the second happened a lot.


  • Tech Staff

    @ari

    The attached patch should at least solve the second scenario. The first one is more difficult, maybe if you change the depth max value to a lower number so the camera doesn't see the wall and that way it cannot think the shadow on the wall is a person.

    Reset OpenNI.izz

    Best Michel



  • Thank you very much! I will try it out and let you know!



  • @michel said:

    maybe if you change the depth max value to a lower number so the camera doesn't see the wall and that way it cannot think the shadow on the wall is a person.

     isn't the depth max only referring to the visual image of the depth image, I understood that it doesn't restrict the actual tracking area of the kinect, or am I wrong? (I am somehow having problem copy pasting your set-up in my patch, the copy pasted part, even when I myself rebuild it somehow gets inactive, lines stay red.... on it, but let you know when I have results there).


  • Tech Staff

    @ari

    you are totally right about the depth max referring to the visual image, forgot that. Would be very handy if this would be performed before the skeleton tracking. 

    If you use my patch as sent without copy pasting it does it then work?

    Best Michel



  • Yes it does work, just not the copy pasting somehow, I did now also got the chance to try it. It does somehow less tend to make another object into a body, but I still did manage to recreate this problem also in your patch. Unfortunatly it doesn't solve it. There seems to be still a trigger send even if the numbers are visually not changing anymore. Your patch nicely and seemingly quite reliably restarts every time a body leave the tracking area, but if the tracking gets applied immediatly to another object (with or without a skeleton drawn on it) it doesn't restart... The space where my installation will be build will be less 'cluttered' then the room I am in now, but there is the chance of course of a wall or object in the back that might be tracked... Do you have any ideas on how to restrict tracking depth of the kinect, that could also be the solution..


  • Tech Staff

    @ari

    Well my patch does not solve the problem from thinking an object is a body, it resets if a body leaves the space. Also if a body enters the room before the 1 second is over it will not trigger the reset. You can try with lowering the 1 second time. 
    I have no idea of lowering the tracking depth, but as you say if you are in the performance space that is not that cluttered this problem may go away.

    Concerning triggering even though the visual number is not changing may be similar to this problem: https://community.troikatronix...

    The values change in the after floating point area that is not shown at the output. Maybe you could put a "float to integer" actor in-between the torso-x output and the trigger delay actor, this way it will cut a way these small not visible changes.

    Best Michel



  • Thanks the floet to integer actor is a good idea, I will play with that1

    To reset the actor in case it trackes the background I now decided to use this simple set-up with a comparator defining the max z distance.

    Thanks