Weighted multi-resolution phase-unwrapping method