Giter Site home page Giter Site logo

gpu_flow's Introduction

GPU based optical flow extraction in OpenCV

Features:

  • OpenCV wrapper for Real-Time optical flow extraction on GPU
  • Automatic directory handling using Qt
  • Allows saving of optical flow to disk, ** either with clipping large displacements ** or by adaptively scaling the displacements to the radiometric resolution of the output image

Dependencies

Installation

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

Configuration:

You should adjust the input and output directories by editing the variables vid_path, out_path and out_path_jpeg in compute_flow.cpp. Note that these folders have to exist before executing.

Usage:

./brox_flow [OPTION]...

Available options:

  • start_video: start with video number in vid_path directory structure [1]
  • gpuID: use this GPU ID [0]
  • type: use this flow method Brox = 0, TVL1 = 1 [1]
  • skip: the number of frames that are skipped between flow calcuation [1]

Additional features in compute_flow.cpp:

  • float MIN_SZ = 256: defines the smallest side of the frame for optical flow computation
  • float OUT_SZ = 256: defines the smallest side of the frame for saving as .jpeg
  • bool clipFlow = true;: defines whether to clip the optical flow larger than [-20 20] pixels and maps the interval [-20 20] to [0 255] in grayscale image space. If no clipping is performed the mapping to the image space is achieved by finding the frame-wise minimum and maximum displacement and mapping to [0 255] via an adaptive scaling, where the scale factors are saved as a binary file to out_path.

Example:

./brox_flow gpuID=0 type=1 

gpu_flow's People

Contributors

feichtenhofer avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.