We design and implement a robust vehicle classification system based on pan-tilt-zoom cameras. We introduce a simple but effective camera-invariant feature to describe the intrinsic shape patterns of vehicles. The introduced feature can be directly extracted from two-dimensional images, eliminating the need for complicated three-dimensional template fitting used in existing vehicle classification systems. Also, we introduce a prevalent sparse model to make the discriminative learning procedures robust to noise. Experimental results on practical highways show that the proposed system could achieve promising results on vehicle classification in real time.