Retrieve Velocity of Blob Object Tracking

I would like to do two things:

  1. Get the velocity of individual blobs when tracking

  2. Get an average of the overall velocity of what I’m tracking

I can’t figure out whether I should just use optical flow to do this, nor do I understand how to get the velocity from even say one box.

vel_test.toe (6.7 KB)

Any help would be great

I believe this is what you are after. This gives you the individual X and Y speed components of the blob as well as a combined vector speed (magnitude). Please note I added a second LFO so that your circle moves in both axes. I also lowered the resolution being fed to the Blob TOP as you were getting a big performance hit because of the 1920x1080 which is not necessary if you’re only detecting blobs and calculating speeds.

The slope CHOP calculates the derivative or speed from the position values and the “trick” for getting the magnitude of the speed vector (combined speed) is to use the Math CHOP’s combine channels using the length method. This effectively performs a Pythagorean √(x2 + y2) of both speeds.

Blob speed and magnitude.toe (4.7 KB)

Hope this helps!