Skip to content

Tools to extract dense optical flow from videos, based on OpenCV

Notifications You must be signed in to change notification settings

milkcat0904/dense_flow

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Extracting dense flow field given a video.

Depencies:

  • LibZip: to install on ubuntu apt-get install libzip-dev on mac brew install libzip

For OpenCV 3 Users

Please see the opencv-3.1 branch. Many thanks to @victorhcm for the contributions!

A.下载 Download

$ git clone --recursive http://github.com/yjxiong/dense_flow

B.安装 Install

1.在下载包的目录下执行cmd:

    $ mkdir build 

    $ cd build
    
    $ cmake .. 

2.修改build文件夹中的CMakeCache.txt文件,将参数置为OFF

(当执行make -j出现Error:cannot find -lopencv dep_cudart时)

image

    $ make -j

C.使用

$ ./extract_gpu -f test.avi -x tmp/flow_x -y tmp/flow_y -i tmp/image -b 20 -t 1 -d 0 -s 1 -o dir

- `test.avi`: input video
- `tmp`: folder containing RGB images and optical flow images
- `dir`: output generated images to folder. if set to `zip`, will write images to zip files instead.

D.Warp Flow

The warp optical flow is used in the tsn model


To extract warp flow, use the command

$ ./extract_warp_gpu -f test.avi -x tmp/flow_x -y tmp/flow_y -i tmp/image -b 20 -t 1 -d 0 -s 1 -o dir

About

Tools to extract dense optical flow from videos, based on OpenCV

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 77.6%
  • MATLAB 8.7%
  • Python 7.0%
  • CMake 6.7%