Periodic health checks of contouring errors under unloaded conditions are critical for machine performance evaluation and value-added manufacturing. Aiming at breaking the dimension, range and speed measurement limitations of the existing devices, a cost-effective knowledge-driven approach for detecting error motions of arbitrary paths using a single camera is proposed. In combination with the PNP algorithm, the three-dimensional (3D) evaluation of large-scale contouring error in relatively high feed rate conditions can be deduced from a priori geometrical knowledge. The innovations of this paper focus on improving the accuracy, efficiency and ability of the vision measurement. Firstly, a camera calibration method considering distortion partition of the depth-of-field (DOF) is presented to give an accurate description of the distortion behavior in the entire photography domain. Then, to maximize the utilization of the decimal involved in the feature encoding, new high-efficient encoding markers are designed on a cooperative target to characterize motion information of the machine. Accordingly, in the image processing, markers are automatically identified and located by the proposed decoding method based on finding the optimal start bit. Finally, with the selected imaging parameters and the precalibrated position of each marker, the 3D measurement of large-scale contouring error under relatively high dynamic conditions can be realized by comparing the curve that is measured by PNP algorithm with the nominal one. Both detection and verification experiments are conducted for two types of paths (i.e., planar and spatial trajectory), and experimental results validate the measurement accuracy and advantages of the proposed method.