This phase unwrapping algorithm is based on the theory and c++ code from: "Two-Dimensional Phase Unwrapping, Theory, Algorithms, and Software" written by Dennis C. Ghiglia and Mark D. Pritt
This program uses weighted least-squares phase unwrapping technique (i.e. weighted Laplace unwrapping) with a solution using iterative algorithm, namely preconditioned conjugate gradient (PCG).
In order to get rid of the residual phase ambiguities after unwrapping process (which occur for all least-squares approaches) a congruence operation is applied.
In order to run this script the following files from MATLAB exchange server are required: