用法:
skimage.restoration.unwrap_phase(image, wrap_around=False, seed=None)
從包的相位圖像中恢複原件。
從一個包在區間 [-pi, pi) 中的圖像,恢複原始的、未包的圖像。
- image:浮點數的 1D、2D 或 3D ndarray,可選的掩碼數組
這些值應在 [-pi, pi) 範圍內。如果提供了掩碼數組,則掩碼條目將不會更改,並且它們的值不會用於指導相鄰的未掩碼值的展開。屏蔽一維數組是不允許的,並且會引發 ValueError
- wrap_around:bool 或 bool 序列,可選
當序列中的某個元素為 True 時,展開過程會將沿圖像相應軸的邊視為連接,並使用此連接性來指導相位展開過程。如果隻給出一個布爾值,它將應用於所有軸。一維數組不支持環繞。
- seed:int 可選
展開 2D 或 3D 圖像使用隨機初始化。這設置了 PRNG 的種子以實現確定性行為。
- image_unwrapped:數組, 雙
與輸入具有相同形狀的展開圖像。如果輸入圖像是掩碼數組,則掩碼將被保留。
- ValueError
如果使用掩碼一維數組調用或使用一維數組和
wrap_around=True
調用。
參數:
返回:
拋出:
參考:
- 1
Miguel Arevallilo Herraez, David R. Burton, Michael J. Lalor, and Munther A. Gdeisat, “Fast two-dimensional phase-unwrapping algorithm based on sorting by reliability following a noncontinuous path”, Journal Applied Optics, Vol. 41, No. 35 (2002) 7437,
- 2
Abdul-Rahman, H., Gdeisat, M., Burton, D., & Lalor, M., “Fast three-dimensional phase-unwrapping algorithm based on sorting by reliability following a non-continuous path. In W. Osten, C. Gorecki, & E. L. Novak (Eds.), Optical Metrology (2005) 32-40, International Society for Optics and Photonics.
例子:
>>> c0, c1 = np.ogrid[-1:1:128j, -1:1:128j] >>> image = 12 * np.pi * np.exp(-(c0**2 + c1**2)) >>> image_wrapped = np.angle(np.exp(1j * image)) >>> image_unwrapped = unwrap_phase(image_wrapped) >>> np.std(image_unwrapped - image) < 1e-6 # A constant offset is normal True
相關用法
- Python skimage.restoration.unsupervised_wiener用法及代碼示例
- Python skimage.restoration.denoise_wavelet用法及代碼示例
- Python skimage.restoration.wiener用法及代碼示例
- Python skimage.restoration.cycle_spin用法及代碼示例
- Python skimage.restoration.estimate_sigma用法及代碼示例
- Python skimage.restoration.inpaint_biharmonic用法及代碼示例
- Python skimage.restoration.denoise_tv_chambolle用法及代碼示例
- Python skimage.restoration.denoise_bilateral用法及代碼示例
- Python skimage.restoration.richardson_lucy用法及代碼示例
- Python skimage.restoration.calibrate_denoiser用法及代碼示例
- Python skimage.restoration.rolling_ball用法及代碼示例
- Python skimage.restoration.denoise_nl_means用法及代碼示例
- Python skimage.registration.optical_flow_tvl1用法及代碼示例
- Python skimage.registration.optical_flow_ilk用法及代碼示例
- Python skimage.feature.graycomatrix用法及代碼示例
- Python skimage.color.lab2lch用法及代碼示例
- Python skimage.draw.random_shapes用法及代碼示例
- Python skimage.feature.blob_doh用法及代碼示例
- Python skimage.feature.blob_dog用法及代碼示例
- Python skimage.filters.unsharp_mask用法及代碼示例
注:本文由純淨天空篩選整理自scikit-image.org大神的英文原創作品 skimage.restoration.unwrap_phase。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。