Collecting real-time traffic flow information is a foundational function in intelligent transportation systems. Video based traffic monitoring system has advantage of installation and maintenance, so it iswidely used for traffic monitoring on main road and crossroad. Shadows result from roadside building or trees are one of the factors that arise errors in video based vehicle detection. An improved method based on edge information is proposed for vehicle detection and shadow rejection. Finally vehicle counting is achieved based on the edge detection method.