With the rapid development of high-speed and heavy-load in modern rail transit, the abrasion and surface defect of rail
are getting serious, and the demand of measuring the rail shape and surface defect has been rising. Phase Measuring
Profilometry (PMP), due to the good characters of non-contact, high precision, easy to control automatically etc., is often
used for precise 3D shape reconstruction. In this paper, PMP technology and Stoilov phase shift algorithm are adopted,
three deformed fringe patterns of rail are collected with fixed phase shift between them, and branch cut phase
unwrapping algorithm is used, based on which the three-dimensional surface shape of the rail is reconstructed and the
artificial surface flaws are restored and measured. This method provides a good reference for the precise online detection
of the rail abrasion and surface defect.