Closed davidw212 closed 8 years ago
Hi @davidw212
There are two options.
You can use ofxCv's getVelocity function
or
If you make two variables in the Blobs Class.
int starttime; int endtime;
Set them to both to 0 in the setup loop. Then record the unix time using [ofGetUnixTime()] into starttime when it hits the first line (http://openframeworks.cc/documentation/utils/ofUtils/#!show_ofGetUnixTime).
just before the blob hits the second line, record the unix time again into the endtime. minus the starttime from endtime. i.e
int difftime = endtime - starttime;
That should give you the desired time.
Best
How can the time it takes blobs\people between the green\red in\out latch lines be calculated? effectively trying to figure out speed the person is walkng\running.
cool project