LEGO Lab: Speed Estimation by Pocket PC with Camera

One of the steps towards the perfect drivers aid system (or perhaps even a self-driving vehicle) is estimating the speed in which the vehicle is cruising at any moment.

Abstract
One of the steps towards the perfect drivers aid system (or perhaps even a self-driving vehicle) is estimating the speed in which the vehicle is cruising at any moment. Such a system would have to supply reliable real-time results. The input for this system is a single camera situated on the vehicle and directed forward. Such setup prevents the use of different speed estimation methods, such as mechanical measurements or the calculation of distances by the angle between two cameras pointed at the same object. In this project we chose to estimate the cruising speed using various road signs on the sides of the road, measuring their distances according to the properties of the perspective distortion.

The problem
For the system to work in real-time, it would have to process several frames every second. To accomplish this, a very fast algorithm capable of processing each frame within a split second would have to be developed. Since the system has to be pervasive, the final goal is to develop an algorithm capable of running on a PocketPC in real-time. Such a requirement would impose several limitations on the algorithm: It would have to be very simple in terms of calculation complexity (due to the limited processing power of the device), it would have to be based mainly on integers (due to the limited support of floating-point calculation by many PocketPC devices), and it would have to possess a very small memory signature (due to the limited amount of memory on such devices). In this book we will evaluate the performance of the speed estimation algorithm using perspective distortion, and will address the possibility of implementing such an algorithm on a PocketPC platform.

The solution
In order to estimate object distance from its height, the perspective distortion is used:
1
Figure 1 – Perspective Distortion Diagram

Perspective distortion properties give us inverse linear relation between distance in 3D space and height at 2D plane. The constant for this relation is calculated at learning stage of the algorithm. After the calibration (the learning stage) linearity can be used to get real distances, time interval between frames can be calculated from a FrameRate, using those two results momentary velocity calculated between two frames. From N+1 momentary velocities N (minimal standard deviation) are chosen in order to calculate average velocity.

2
Figure 2 – Flow Chart for Speed Estimation Algorithm

Tools
The algorithm was implemented on MATLAB 6.5 R13 platform. The Nikon Coolpix 3100 camera was used in order to capture video and stills images.

Results
Distance Estimation from perspective distortion:
3
Figure 3 – Block Diagram for Distance Estimation

Speed estimation results for three different movies (different speeds) gave less than 10% mistake.

Conclusions
This project proves that it is possible to create reliable speed estimation system which uses limited resources (memory, CPU time), although there is still much more improvements that should be done. Such as object height recognition system, which should work on PocketPC platform in real time, conversion to integer arithmetics only, code optimization.

Acknowledgment
We are grateful to our project supervisor Eli Appelboim for his help and guidance throughout this work. We would also like to thank the lab staff, Johanan Erez and Ina Krinsky for their technical support.
We are also grateful to the Ollendorff Minerva Center Fund for supporting this project.