This paper proposes a novel shadow elimination method for solving the shadow occlusion problems of vehicle analysis. Different from traditional methods which only consider intensity properties in shadow modeling, this method introduces a new important feature to eliminate all unwanted shadows, i.e., lane line geometries. In this approach, a set of moving vehicles are first segmented from backgrounds by using a background subtraction technique. At this moment, each extracted vehicle may contain shadows which will cause the failure of further vehicle analysis. To remove these unwanted shadows, a histogram-based method is then proposed for detecting different lane dividing lines from video sequence. According to these lines, a line-based shadow modeling process is then applied for shadow elimination. Two kinds of lines are used here for shadow elimination, i.e., the ones parallel and vertical to lane directions, respectively. Different type of lines has different capabilities to eliminate different kinds of shadows. Experiments demonstrate that approximately 92% of shadows can be successfully eliminated from moving vehicles.