用法:
skimage.registration.optical_flow_ilk(reference_image, moving_image, *, radius=7, num_warp=10, gaussian=False, prefilter=False, dtype=<class 'numpy.float32'>)
粗到细的光流估计器。
迭代Lucas-Kanade (iLK) 求解器应用于图像金字塔的每个级别。 iLK [1] 是 TVL1 算法的快速且稳健的替代方案,尽管在渲染平面和对象边界方面不太准确(请参阅[2])。
- reference_image:ndarray,形状(M,N[,P[,…]])
序列的第一幅灰度图像。
- moving_image:ndarray,形状(M,N[,P[,…]])
序列的第二个灰度图像。
- radius:int 可选
每个像素周围考虑的窗口半径。
- num_warp:int 可选
moving_image 扭曲的次数。
- gaussian:布尔型,可选
如果为 True,则使用高斯核进行局部积分。否则,使用统一内核。
- prefilter:布尔型,可选
是否在每个图像扭曲之前对估计的光流进行预过滤。当为 True 时,将应用沿每个轴的窗口大小为 3 的中值滤波器。这有助于消除潜在的异常值。
- dtype:dtype,可选
输出数据类型:必须是浮点数。与双精度相比,单精度提供了良好的结果并节省了内存使用和计算时间。
- flow:ndarray, 形状 ((reference_image.ndim, M, N[, P[, ...]])
每个轴的估计光流分量。
参数:
返回:
注意:
- 实现的算法在表2的[1].
- 不支持彩色图像。
参考:
- 1(1,2)
Le Besnerais, G., & Champagnat, F. (2005, September). Dense optical flow by iterative local window registration. In IEEE International Conference on Image Processing 2005 (Vol. 1, pp. I-137). IEEE. DOI:10.1109/ICIP.2005.1529706
- 2
Plyer, A., Le Besnerais, G., & Champagnat, F. (2016). Massively parallel Lucas Kanade optical flow for real-time video processing applications. Journal of Real-Time Image Processing, 11(4), 713-730. DOI:10.1007/s11554-014-0423-0
例子:
>>> from skimage.color import rgb2gray >>> from skimage.data import stereo_motorcycle >>> from skimage.registration import optical_flow_ilk >>> reference_image, moving_image, disp = stereo_motorcycle() >>> # --- Convert the images to gray level: color is not supported. >>> reference_image = rgb2gray(reference_image) >>> moving_image = rgb2gray(moving_image) >>> flow = optical_flow_ilk(moving_image, reference_image)
相关用法
- Python skimage.registration.optical_flow_tvl1用法及代码示例
- Python skimage.restoration.denoise_wavelet用法及代码示例
- Python skimage.restoration.wiener用法及代码示例
- Python skimage.restoration.cycle_spin用法及代码示例
- Python skimage.restoration.unwrap_phase用法及代码示例
- 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.unsupervised_wiener用法及代码示例
- Python skimage.restoration.rolling_ball用法及代码示例
- Python skimage.restoration.denoise_nl_means用法及代码示例
- 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.registration.optical_flow_ilk。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。