I have seen a scheme where a laser range finder is over each lane and pointing down. You get two range readings depending upon the presence of a vehicle or not. From the average traffic speed and the time of the short range reading you can estimate the vehicle length.