-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathunwrapping.py
executable file
·42 lines (31 loc) · 980 Bytes
/
unwrapping.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"""
phaseUnwrapping
=======
Contains different phase unwrapping strategies.
"""
from simplestereo import _unwrapping
def infiniteImpulseResponse(phase, tau=1):
"""
Unwrap a 2D phase map.
Method from "Noise robust linear dynamic system for
phase unwrapping and smoothing", Estrada et al, 2011,
DOI: 10.1364/OE.19.005126
Parameters
----------
phase : ndarray
A 2D array containing the wrapped phase values.
tau : float, optional
Noise regularization parameter. Accept values from 0 to 1.
Lower values used for higher error.
Default to 1.
Returns
-------
ndarray
Unwrapped phase with same dimensions and type of `phase`.
See Also
--------
<https://doi.org/10.1016/j.optlaseng.2012.01.008>
.. todo::
If called twice, it may not work. To be fixed!
"""
return _unwrapping.infiniteImpulseResponse(phase, tau)