Motion in Computer Vision
Motion can be tracked with a 2D motion vector. A vector has a direction and magnitude which will determine the direction and amount of movement between one frame and the next one.
First we will have to defive special points to track like for example intersections or corners once we localize those features in both frames we can track the motion vector. The magniture of the vector (how much it moved) can be found by the Pythagorean theorem:
a2 + b2 = c2
so the magnitude = sqrt(a2 + b2)
as for the direction we can calculate the angle:
angle = tan-1(b/a)
Knowing those 2 things we can track an object