Phase shifting profilometry (PSP) technique is widely used as a 3-D shape measurement technique due to its robustness and accuracy. However, PSP requires multiple fringe pattern images to be projected onto an object and a reference plane to calculate the phase value, and also the object must maintain motionless when the measurement is taken. If the object moves during the measurement, significant errors will be introduced when calculating the phase value. This paper analyses the relationship between the object movement and the phase value, and proposes a method for compensating the errors caused by two-dimensional movement of object. This method can eliminate the errors caused by two-dimensional movement of object and reconstruct the object shape successfully. The effectiveness of the proposed method is verified by simulations. © 2012 SPIE.