用法:
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。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。