Looking for some advice on how to get the speed or velocity of some x point. Little background on what I am attempting to do: Using a Kinect to control the camera’s x position with persons hand. I have like 10 “rooms” in a row and you use your hand to navigate from one room to the next. But the person also is able to move the camera around a little bit in one room without switching to the next. To differentiate between the two types of actions I need to find the velocity of the hands movement to see if the stride was fast enough to warrant moving the screen to the next room.

The way I am thinking about going about it now is to use two constant chops and snap the position repeatedly and check the distance between the two points if it is large enough move to the next room. Problem with this is I am relying on a static time interval rather than something dynamic like velocity which is constantly changing. I think it will have a better overall effect basing the movement on speed rather than distance traveled. If anyone knows a good way to do this within touch rather than writing a script to do this please let me know!!

1 Like

I think you can use the Speed CHOP for this?
derivative.ca/wiki077/index. … Speed_CHOP
rod.

Speed chop did not seem to give me the intended result that i was looking for. But for now I ended up writing a small script that does a modular equation to check the distance between to close x values based on 5 frames. It works but is inconsistent with capture points. What I am really looking for is a way to calculate how fast someone is moving there hand across the plain and have certain events trigger at different speeds. Thanks for the post regardless though!!

I think if you use the time (\$T) variable in a script you’ll get much better results. Actually the expression chop would probably be even better. You can use the wrap expression to get a looping value. Also you could sample your data every second and then subtract the previous value from the current value to get your units/sec value. I was interested in making this a happen so here is a sample project. I don’t have any experience with kinect but you should be able to replace the noise and speed chops in the example with your x y values coming in from kinect.
Velocity.toe (4.65 KB)

check the trail SOP, it can compute velocity

Thanks for all of the input. Once I get the rest of the functionality working for this project I really want to get the gesture reading to be of a better quality. Will definitely take a look at the sample.

You may have wanted the Slope CHOP. It measures the rate of change of CHOP channels (how much the channel is changing per second).

To capture more deliberate gestures and not little twitches, you may want to put a Filter CHOP before the Slope CHOP.

To get a proper trigger signal, you can send the Slope CHOP to a Math CHOP where your To Range lower number is set to the threshold rate, then connect that to either (1) a Trigger CHOP, (2) a Logic CHOP or (3) a CHOP Execute DAT (set to Off to On).

1 Like

another approach with the kinnect might be to use hand movements relative to the center of the body for th e’local’ moves in the room, then use relocation of the whole body to switch rooms, so you actually move to each room with your feet and body but navigate the rooms wit hyour hands.