File Exchange

image thumbnail

Fast 2D phase unwrapping

version 1.1.0.0 (4.01 KB) by Firman
Fast 2D phase unwrapping implementation in MATLAB

33 Downloads

Updated 30 Nov 2018

From GitHub

View Version History

View license on GitHub

Fast unwrapping 2D phase image using the algorithm given in:
M. A. Herraez, D. R. Burton, M. J. Lalor, and M. A. Gdeisat, "Fast two-dimensional phase-unwrapping algorithm based on sorting by reliability following a noncontinuous path", Applied Optics, Vol. 41, Issue 35, pp. 7437-7444 (2002).

Features and advantages:

* Fast algorithm (takes approx. 0.5s to unwrap 512x512 non-noisy and noisy image in my computer)
* Support ignored regions, by setting NaN to the ignored regions.

If using this code for publication, please kindly cite the following:

* M. A. Herraez, D. R. Burton, M. J. Lalor, and M. A. Gdeisat, "Fast two-dimensional phase-unwrapping algorithm based on sorting by reliability following a noncontinuous path", Applied Optics, Vol. 41, Issue 35, pp. 7437-7444 (2002).
* M. F. Kasim, "Fast 2D phase unwrapping implementation in MATLAB", https://github.com/mfkasim91/unwrap_phase/ (2017).

This algorithm is also available from GitHub (https://github.com/mfkasim91/unwrap_phase/)

Cite As

Firman (2021). Fast 2D phase unwrapping (https://github.com/mfkasim1/unwrap_phase), GitHub. Retrieved .

Comments and Ratings (14)

Alexander S

I get the same performance as you (0.5s for 512x512), but this one performs actually much faster (0.12s).

(https://www.mathworks.com/matlabcentral/fileexchange/53864-function-to-unwrap-phase-having-2-pi-jumps-just-after-phase-extraction-from-interferogram)

keita tomita

Abdurrahim Yilmaz

Prasobhkumar P. P.

Please ignore my previous comment.

Prasobhkumar P. P.

Same result as Ms. Grace's

Elizabeth Grace

All the phase jumps are still present in the image.

Joven Chou

Firman

Hi LOOH AUGUSTINE NGIEJUNGBWEN, strip function is just to remove leading and trailing whitespaces from the user input. It is not vital in the code and it should still works without it as long as your input does not have whitespaces (e.g. spaces, tabs).

Hello there!! I'm using MATLAB 16a, when i run the function as explained, an error is signaled for line 11. It does not recognize the function 'strip' you used. A quick fix is that i commented out that line since the next line made me understand it wasn't all that necessary in the first place. Thanks for this post. It was really helpful to me.

Chun-Hsiung Wang

Daniel Prigge

Bo Miao

Matthew Jaffe

Oscar Cortes

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: 2D Weighted Phase Unwrapping

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!