In order to achieve visual measurement error compensation for the surface of thin-walled components with chatter, a new real-time adaptive correction method for chatter motion error is proposed in this paper. Firstly, according to the mechanism of the chatter effect, an error analysis model of the dynamic structured light phase principal value is derived. Then, a real-time optimization method for the motion phase error in the frame of structured light projection is proposed. Meanwhile, a compensation method based on an adaptive grating projection period is proposed to eliminate the cumulative error of inter-frame chatter motion. Finally, a structured light visual inspection system and an experimental platform for chattering thin-walled parts are established for experimental verification. The experimental results under slight and severe chatter conditions indicate that the proposed method can optimize the phase errors within the projected frame in real time under any scenario, compensate for the cumulative errors between projected frames, and improve the point cloud accuracy of real-time 3D reconstruction.