Introduction
Optical Flow is a motion of a certain target in consecutive frames, which is caused by the motion of target, scene or camera. It reflects the image changes caused by motion in a small time interval to determine the direction and speed of motion of the image points.
Assumptions
Optical Flow provide the clue of motion recovering. It mainly depends on three assumptions:
- [Constant light] The pixel light of target is constant in consecutive frames;
- [Time sequence] The time interval of consecutive frames is so small that the change of time can be ignore when considering the motion change(This assumption is to be used for deducing the core formula of Optical Flow Algorithm);
- [Neighborhood consistency] Neighbor pixels have the similar motion.
Formula Deducing
Assumed that the light of a certain pixel is
Performing a first order taylor expansion on the right side of the equation, we can obtain a formula below.
means that.
therefore.
It’s matrix format is like this;
where
In consecutive frames,
According to assumption 3, the neighbor pixels have the same optical flow, we can choose a
Considering all pixels in neighbor region, we can obtain a matrix formula.
The equation can be written as
Attention
The
Except mentioned above, Lucas and Kanade proposed using pyramid images to solve the problem caused by large offset. Eventually, Lucas-Kanade’s method was used to obtain sparse optical flow. The Lucas-Kanade method is a classical optical flow algorithm. Farneback proposed a method to obtain dense optical flow in 2003. The GIF below is the compare of sparse and dense optical flow.
In ICCV2015, a group proposed a deep learning method FlowNet to solve problems of optical flow estimation using CNN. In CVPR2017, the same group proposed a modified FlowNet2.0. FlowNet2.0 is the most popular paper in optical flow field since 2015.
Reference and Further reading
Farneback: https://blog.csdn.net/xholes/article/details/79894340
Flow Net: https://zhuanlan.zhihu.com/p/37736910
Flow Net: https://zhuanlan.zhihu.com/p/74460341