Home

Awesome

GPU based optical flow extraction in OpenCV

Features:

Dependencies

Installation

  1. mkdir -p build
  2. cd build
  3. cmake ..
  4. make

Configuration:

You should adjust the input and output directories by passing in vid_path and out_path. Note that vid_path must exist, Qt will create out_path. Use -h option t for more. In the CMakeLists.txt there is an option called WARP. This selects if you want warped optical flow or not. The warped optical flow file also outputs optical flows as a single BGR image (red is the flow magnitude). In the compute_flow_si_warp file itself there is a warp variable that you can set to false to just compute normal flow. If you want grayscale for images (x and y) use compute_flow.

Usage:

./compute_flow [OPTION]...
./compute_flow_si_warp [OPTION] ..

Available options:

Additional features in compute_flow.cpp:

Example:

./compute_flow --gpuID=0 --type=1 --vid_path=test --vid_path=test_out --stride=2