Why do we need phase unwrapping?
Phase unwrapping is needed to make the distribution of phase continuous. Unwrapping requires knowledge of the fringe sign and the phase of the starting point. In the unwrapping function shown below, the fringe sign is set to monotonically increase from right to left of the starting point which has zero phase.
What is a wrapped phase?
Wrapped phase means that all phase points are constrained to the range -180 degrees ≤ Phase Offset < 180 degrees. When the actual phase is outside this range, the phase value is increased or decreased by a multiple of 360 degrees to put the phase value within +/- 180 degrees of the Phase Offset value.
How does unwrap work?
Whenever the jump between consecutive angles is greater than or equal to π radians, unwrap shifts the angles by adding multiples of ±2π until the jump is less than π. If P is a matrix, unwrap operates columnwise. If P is a multidimensional array, unwrap operates on the first dimension whose size is larger than 1.