how to get direction of moving object?
Hi,
I am writing a code for moving objects detection, but now i want to count in/out objects. Now i can count olny how many objects cross the line. What is the best way to do that?
For detection I use frames substraction (first frame with current frame).
Google : opencv + tracking
That is about all you actually need...
hahhhahaha... I know how to track an object, but i don't know how to determine if object is comming in or out
I'm not experienced on the matter, but, if you know an object previous and actual position,isn't it trivial to determine the direction of movement? Maybe you didn't explain the problem very well
@rokasma, if you actually understand the tracking, then indeed, defining a direction between subsequent points is easy. Just define a function for your border. If the applied coordinates are filled into the equation, you can define where the point lies, even when it is exact on the border.
Doesn't that solve your problem?