This paper presents a video-based urban traffic flow detection system and a novel vehicle recognition algorithm. Firstly, moving objects on the roadway are detected. Then, the vehicles are recognized based on their motion information and shape characteristics. Considering that objects' shadows will impact the objects appearance and result in false recognition, a novel shadow detection approach is described: object shadows' are detected and separated from the moving objects by using intensity characteristics. The experiment results show that the system can greatly reduce the impact of shadow, and accurately detect and recognize the vehicles on the urban multi-traffic road, while satisfying the real-time requirement.