title: calculate speed of vehicle using matlab
body: <p>I have a project that I have to calculate speed of vehicle in a camera traffic. I used Background subtraction algorithm to get the foreground (moving object). after I got foreground, centroid, boudaries of each object, I have to calculate the speed of each object. to do that, I will calculate the distance the each vehicle moved in a time. but  the problem is in next frame I don't know what is the object in previous frame.  I can not identify exactly 1 vehicle for 2 consecutive frames. who can help me?  </p>