## calculate speed of changing floats & detect activity

Apr 21, 2012 at 7:08pm

# calculate speed of changing floats & detect activity

Hi,
i have built a patch (jit) to detect direction of movement in front of
a camera (with cv.jit.lkflow).
now i want to calculate the energy/speed of motion.
x=s(t)/t
s = [(last float value)-(first float value)]* (-1)
t= (time of last float value) – (time of first float value)
is anybody good at math? ( :

i need to know:
> when does movement start/ end (by a threshold time gap between float/bang(?) )
> time in between

objects that i have reviewed:
counter, timer

i don’t get it.. ) :
Probably there is another way to solve this problem, but I’m too stupid!

thank you
greetings

– Pasted Max Patch, click to expand. –
#63111
Apr 21, 2012 at 10:16pm

Hi Fluxus,

You probably don’t need the time if you’ve got a reasonably consistent frame rate.

Rather than multiply your difference by -1, consider just taking the absolute value instead: [abs 0.]

hth

#227751
Apr 22, 2012 at 12:45am

yeah, that’s a good idea!
thank you.
do you know a object that stores the values in a way, that the operations can be processed?

#227752

You must be logged in to reply to this topic.