is illustrated a random frame from the tracking camera showing a vehicle 110 in the tracking zone fig6 b illustrates a rectified image from the random sample image of fig6 a showing the projection of the vehicle onto the road surface according to one embodiment the rectified images contain only pixels that correspond to the marked road surface in the original images each pixel in the rectified images may also bear geometrical information for example each pixel may represent a 0 5 feet by 0 5 feet patch on the road plane therefore distance between two arbitrary pixels in the rectified images can be easily calculated to be able to calculate vehicle speeds the system needs first to detect and identify moving vehicles from the images retrieved from the tracking camera in one embodiment detection of moving vehicles is achieved by performing segmentation on the rectified images the segmentation algorithm generates and maintains a background image step 208 of the road that represents the road surface without any moving object at each frame it then compares the currently retrieved image to the background image and identifies pixels with large deviations as foreground pixels the resulting binary images from the segmentation algorithm which consist of foreground and background pixels are called object masks typically foreground pixels caused by moving objects form connected regions in the object mask images this information can be used to detect moving vehicles step.