Phase-unwrapping algorithm in the presence of discontinuities using a system with crossed grating