In view of the correction error problem which is caused by some factors such as dithering, the authors presented a new optical tilt correction method based on grating projection. The method was based on the analysis of each pixel of the data array in a sequence of fringe patterns having multiple frequencies, and setup model for pixel coordinates and pixelslope. Then skew angles of fringes were calculated by trigonometry with the relationship between tilt angle and pixel-slope. At last, tilt correction was realized. The experimental results show that, the algorithm is capable of accurately detecting angle within the range [- 90°,90°], accuracy is 99%. Compared with other algorithms such as Hough transform, the proposed algorithm improves precision and accuracy significantly.