This is a sample code for extracting dense flow field given a video. This repository is forked from https://github.com/wanglimin/dense_flow and includes visualization changes from https://github.com/vadimkantorov/mpegflow. For more information see the original repository from wanglimin.
./denseFlow_gpu -f test.avi -o ./tmp/rgb_output_dir/ -i tmp/image -b 20 -t 1 -d 0 -s 1 -c 1
Additional parameters :
-o tmp/rgbOutputDir [path of where to store RGB images] -c 1 [applyColorMap, true/false]
If you get the problem:
cannot find -lopencv_dep_cudart
add the following flag to cmake
: -DCUDA_USE_STATIC_CUDA_RUNTIME=OFF
See here: opencv/opencv#6542
If the correct version of CUDA_TOOLKIT cannot be find, try setting it manually:
cmake -D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0 ..