(from WikiPedia) Optical flow or optic flow is the pattern of apparent motion of objects, surfaces, and edges in a visual scene caused by the relative motion between an observer and a scene. Optical flow can also be defined as the distribution of apparent velocities of movement of brightness pattern in an image.

    • 光流表示的是相邻两帧图像中每个像素的运动速度和运动方向;
    • 光流的表示方法:使用一个三维数组([height, width, 2])表示,其中height和width分别是图像的高度和宽度,’2’表示 x 和 y 两个方向。
      • 第一通道(即[height, width, 0])表示图像在x方向的偏移方向和大小。这里的x xx方向是水平方向,即图像数组中的行向量方向;
      • 第二通道(即[height,width,1])表示图像在y方向的偏移方向和大小。这里的y方向是竖直方向,即图像数组中的列向量方向;
      • 偏移量的大小是通过数值大小体现的,而偏移方向是通过光流数组的正负体现的。在x方向上,正值表示物体向左移动,负值表示物体向右移动;在y方向上,正值表示物体向上移动,负值表示物体向下移动。
    • warp: 将光流应用到一张图像中