This study addresses the critical challenge of enhancing vehicle classification accuracy in traffic surveys by optimizing the conditions for vehicle axle recognition through artificial intelligence. With current governmental traffic surveys facing issues—particularly the misclassification of freight vehicles in systems employing a 12-category vehicle classification—the research proposes an optimal imaging setup to improve axle recognition accuracy. Field data were acquired at busy intersections using specialized equipment, comparing two camera installation heights under fixed conditions. Analysis revealed that a shooting height of 8.5m combined with a 50°angle significantly reduces occlusion and captures comprehensive vehicle features, including the front, side, and upper views, which are essential for reliable deep learning-based classification. The proposed methodology integrates YOLOv8 for vehicle detection and a CNN-based Deep Sort algorithm for tracking, with image extraction occurring every three frames. The axle regions are then segmented and analyzed for inter-axle distances and patterns, enabling classification into 15 categories—including 12 vehicle types and additional classes such as pedestrians, motorcycles, and personal mobility devices. Experimental results, based on a dataset collected at a high-traffic point in Gwangju, South Korea, demonstrate that the optimized conditions yield an overall accuracy of 97.22% and a PR-Curve AUC of 0.88. Notably, the enhanced setup significantly improved the classification performance for complex vehicle types, such as 6-axle dump trucks and semi-trailers, which are prone to misclassification under lower installation heights. The study concludes that optimized imaging conditions combined with advanced deep learning algorithms for axle recognition can substantially improve vehicle classification accuracy. These findings have important implications for traffic management, infrastructure planning, road maintenance, and policy-making by providing a more reliable and precise basis for traffic data analysis.