opticalFlowRAFT
Description
Use the opticalFlowRAFT
object to estimate the motion direction
and velocity between previous and current video frames using the recurrent all-pairs field
transforms (RAFT) algorithm. This algorithm uses a deep learning network trained on the Kubric
[3] dataset. The RAFT optical
flow estimation algorithm outperforms approaches like Farneback by delivering greater
accuracy, particularly in areas with minimal texture, motion blur, and under difficult camera
movements. It provides dense (per-pixel) and highly accurate estimations, but requires more
time and memory. For quicker but less precise dense optical flow estimation, opt for opticalFlowFarneback
, a traditional vision algorithm that does not rely on deep
learning. Use of this object requires the Deep Learning Toolbox™.
Creation
Description
flowModel = opticalFlowRAFT
returns an optical flow object that
estimates the motion direction and velocity between the previous and current video
frames.
Object Functions
estimateFlow | Estimate optical flow between two frames |
reset | Reset the internal state of the optical flow estimation object |
Examples
References
[1] Teed, Zachary, and Jia Deng. RAFT: Recurrent All-Pairs Field Transforms for Optical Flow. Proceedings of the 16th European Conference on Computer Vision. 2020.
[2] Shah, Neelay, Prajnan Goswami, and Huaizu Jiang. EzFlow: A modular PyTorch library for optical flow estimation using neural networks. 2021. Web. https://github.com/neu-vi/ezflow.
[3] Greff, Klaus, Francois Belletti, Lucas Beyer, Carl Doersch, Yilun Du, Daniel Duckworth, David J. Fleet et al. Kubric: A scalable dataset generator. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 3749-3761. 2022.
Version History
Introduced in R2024b