i think you can measure the speed from image processing , by the way that "continously changing the size of the image" . just like humans the vehicle coming to you is apparently seems small when it is far away. and seems relatively large when it close to you.
for measuring the speed you should have to make some experiments to collect data for this projects.
for example snapshots of vehicle at diferrent point withing 1 Km. and at the last get a ratio of these processing. May be you find the exact speed of the vehicle.