The Fourier Transform Profilometry method in MATLAB is based on the analysis of a reference grating and a deformed grating to obtain the folded phase. After phase unwrapping, the height information of the object is derived based on the relationship between phase and height.