How to detect movement direction OR how to detect if a value is increasing/decreasing

Hi the groovvvvy gang,

Although my problem is “kinect related” I am trying to make this question/thread into something more general that hopefully will also help others.

I am tracking a HAND position using Kinect + openNI, trying to detect if your hand is moving forward or moving backward. I thought it would be simple to take current Hand Z position minus that same Z position but “framedelayed”, this should work in theory… however hand gesture are jerky/jittery and so it doesn’t work AND I’m thinking that my Math/Physics approach to the problem might be wrong… And this is what turns this into a general VVVV question:

How do you check if a value is generally increasing or decreasing in VVVV?

OR How do you detect a movement’s direction?

AND as much as you can DAMPER a value in VVVV,is there anyway to ACCELERATE a value change (if I know that the value’s “trend” is to decrease then can I not “accelerate this to 0”)

Forgive me if this just stems from me being too stoned during Math class.


There are certainly more sophisticated ways of doing it, but I usually find adding the frame differences over a sequence of frames works well. More frames = less jitter + more latency.

Also, the kinect z values can be pretty hard (noisy) to work with, so some general solutions may still have trouble in this case.

FrameDifferenceExample.v4p (12.3 kB)

If you get rid of the sign node should be easy to check for direction also.

Hey Kyle nice to speak again man! We met at NODE13 at the copter thingy, I’m Mangosh the French Londoner, what’s happening? Hope you’re good!

WICKED on the patch, “framedifference” is exactly the node I was looking for. Thank you again, really nice patch, will use it!

Yo man if yo’re ever in London then get in touch. Cheers pal

… no text …

oh man so cool ;]