This paper presents a novel approach to automatic traffic monitoring using 2D spatiotemporal images. A TV camera is mounted above a highway to monitor the traffic through two slice windows, and a panoramic view image and an epipolar plane image are formed for each lane. Our real-time vision system for automatic traffic monitoring, VISATRAM, is an inexpensive system with a PC486 and a frame grabber. The system can not only count vehicles and estimate their speeds, but also classify them using 3D measurements. The system has been tested with real road images under various light conditions, including shadows in daytime and lights at night.