For different transportation agencies that monitor vehicle overloads, develop policies to mitigate the impact of vehicles on infrastructure, and provide the necessary data for road maintenance, they all rely on precise, detailed and real-time vehicle data. Currently, real-time collection of vehicle data (type, axle load, geometry, etc) is typically performed through weigh-in-motion (WIM) stations. In particular, the bridge WIM (BWIM) technology, which uses instrumented bridges as weighing platforms, has proven to be the most widely used inspection method. For most of the BWIM algorithms, the position of the vehicle’s axle (i.e. vehicle wheelbase) needs to be measured before calculating the axle load, and the identification of the axle load is very sensitive to the accuracy of the vehicle wheelbase. In addition, the vehicle’s wheelbase is also important data when counting stochastic traffic flow and classifying passing vehicles. When performing these statistics, the amount of data is often very large, and the statistics can take years or even decades to complete. Traditional manual inspection and recording approaches are clearly not up to the task. Therefore, to achieve automatic measurement of the on-road vehicles’ wheelbase, a framework based on computer vision and view geometry is developed. First, images of on-road vehicles are captured. From the images, the vehicle and wheel regions can be accurately detected based on the You Only Look Once version 5 (YOLOv5) architecture. Then, the residual unified network model is improved and an accurate semantic segmentation of the wheel within the bounding box is performed. Finally, a view geometry-based algorithm is developed for identifying vehicle wheelbase. The accuracy of the proposed method is verified by comparing the identified results with the true wheelbases of both two-axle vehicles and multi-axis vehicles. To further validate the effectiveness and robustness of the framework, the effects of important factors, such as camera position, vehicle angle, and camera resolution, are investigated through parametric studies. To illustrate its superiority, the developed vehicle wheelbase measurement algorithm is compared with two other advanced vehicle geometry parameter identification algorithms and the results show that the developed algorithm outperforms the other two methods in terms of the degree of automation and accuracy.