Aiming at regulating the toll evasion behaviors in highway weight charges and reducing charge disputes caused by jumping, this article studied the algorithm that tracks vehicle beating when it is passing the scale. Based on license plate location, vehicle movement could be characterized by tracking the plate centroid using Lucas-Kanade optical flow algorithm. The optical flow vector of the centroid was calculated frame by frame, which could be used for drawing trajectory of centroid coordinates, and calculating beating parameters. In order to expand the detection range and adaptability of the algorithm, through calculating optical flow hierarchically combined with Gaussian pyramid, then tracking centroid from high lever to low in the image pyramid, it could achieve the capture of the vehicle' fast moving. Through experiments, trajectory reflected vehicle beating information well, which provides a strong evidence means for levy problem of the highway weight charges.