用法:
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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。