All Projects → davidstutz → flow-io-opencv

davidstutz / flow-io-opencv

Licence: other
Fork and OpenCV wrapper of the optical flow I/O and visualization code provided as part of the Sintel dataset [1].

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to flow-io-opencv

CrowdFlow
Optical Flow Dataset and Benchmark for Visual Crowd Analysis
Stars: ✭ 87 (+335%)
Mutual labels:  optical-flow
flowattack
Attacking Optical Flow (ICCV 2019)
Stars: ✭ 58 (+190%)
Mutual labels:  optical-flow
vision-based estimations
Vision-based Robot 3D Pose and Velocities Estimations
Stars: ✭ 32 (+60%)
Mutual labels:  optical-flow
GuidedNet
Caffe implementation for "Guided Optical Flow Learning"
Stars: ✭ 28 (+40%)
Mutual labels:  optical-flow
CorrelationLayer
Pure Pytorch implementation of Correlation Layer that commonly used in learning based optical flow estimator
Stars: ✭ 22 (+10%)
Mutual labels:  optical-flow
BridgeDepthFlow
Bridging Stereo Matching and Optical Flow via Spatiotemporal Correspondence, CVPR 2019
Stars: ✭ 114 (+470%)
Mutual labels:  optical-flow
Optical-Flow-based-Obstacle-Avoidance
Image based obstacle avoidance using optical flow
Stars: ✭ 24 (+20%)
Mutual labels:  optical-flow
SoftNet-SpotME
Shallow Optical Flow Three-Stream CNN For Macro and Micro-Expression Spotting From Long Videos
Stars: ✭ 17 (-15%)
Mutual labels:  optical-flow
PyTrx
PyTrx is a Python object-oriented programme created for the purpose of calculating real-world measurements from oblique images and time-lapse image series. Its primary purpose is to obtain velocities, surface areas, and distances from oblique, optical imagery of glacial environments.
Stars: ✭ 31 (+55%)
Mutual labels:  optical-flow
Face-Detection-and-Tracking
Face Detection and tracking using CamShift, Kalman Filter, Optical Flow
Stars: ✭ 30 (+50%)
Mutual labels:  optical-flow
flow1d
[ICCV 2021 Oral] High-Resolution Optical Flow from 1D Attention and Correlation
Stars: ✭ 91 (+355%)
Mutual labels:  optical-flow
video features
Extract video features from raw videos using multiple GPUs. We support RAFT and PWC flow frames as well as S3D, I3D, R(2+1)D, VGGish, CLIP, ResNet features.
Stars: ✭ 225 (+1025%)
Mutual labels:  optical-flow
correlation flow
ROS package for Correlation Flow (ICRA 2018)
Stars: ✭ 28 (+40%)
Mutual labels:  optical-flow
humanflow2
Official repository of Learning Multi-Human Optical Flow (IJCV 2019)
Stars: ✭ 37 (+85%)
Mutual labels:  optical-flow
Optical-Flow-GPU-Docker
Compute dense optical flow using TV-L1 algorithm with NVIDIA GPU acceleration.
Stars: ✭ 48 (+140%)
Mutual labels:  optical-flow
mmflow
OpenMMLab optical flow toolbox and benchmark
Stars: ✭ 711 (+3455%)
Mutual labels:  optical-flow
deepOF
TensorFlow implementation for "Guided Optical Flow Learning"
Stars: ✭ 26 (+30%)
Mutual labels:  optical-flow
avatar-facial-landmark-detection
A method about optimizing the facial landmark detection based on Kalman Filter, Optical Flow and Dlib
Stars: ✭ 87 (+335%)
Mutual labels:  optical-flow
EPPM
CUDA implementation of the paper "Fast Edge-Preserving PatchMatch for Large Displacement Optical Flow" in CVPR 2014.
Stars: ✭ 34 (+70%)
Mutual labels:  optical-flow
PCLNet
Unsupervised Learning for Optical Flow Estimation Using Pyramid Convolution LSTM.
Stars: ✭ 29 (+45%)
Mutual labels:  optical-flow

Flow IO OpenCV

Build Status

This is a fork and OpenCV wrapper of the optical flow input/output code provided as part of the Sintel dataset [1]. The code is based on imageLib, a small C++ library for multi-channel images based on the StereoMatcher [2] code by Daniel Scharstein and Richard Szeliski. We refer to:

  • lib/README-FlowIO: the original README shipped with the Sintel dataset.

  • lib/imageLib/README: the original README of imageLib shipped with the Sintel dataset.

  • lib/imageLib/README-StereoMatcher: the original README of the StereoMatcher.

    [1] D. J. Butler, J. Wulff, G. B. Stanley, M. J. Black. A naturalistic open source movie for optical flow evaluation. In European Conference on Computer Vision, pages 611 - 625, 2012. [2] D. Scharstein, R. Szeliski. A taxonomy and evaluation of dense two-frame stereo correspondence algorithms. Technical Report MSR-TR-2001-81, Microsoft Research, 2001.

Compile

The OpenCV wrapper is based on CMake and (surprise!) OpenCV (for example, follow Installing OpenCV on Linux to install OpenCV). The code has been tested on Ubuntu 14.04 and 14.10.

$ sudo apt-get install cmake build-essential libboost-all-dev
$ mkdir build
$ cd build
$ cmake ..
$ make
$ ./cli/cli --help
Allowed options:
  --help                produce help message
  --input-dir arg       input directory
  --output-dir arg      output directory
  --vis-dir arg         visualize results in a separate directory

The provided command line tool can be used to convert .flo files to .txt files using the cv::FileStorage format. Additionally, the tool provides visualization capabilities. For example:

$ ./cli/cli ../alley_1_flow ../alley_1_cflow --vis-dir ../alley_1_flow_vis

The result is shown below:

Example: visualized flow of the alley_1 sequence.

Usage

A usage example is provided in cli/main.cpp:

// Define input file and output (visualization) path (or directly output file).
boost::filesystem::path in_file(...);
boost::filesystem::path out_dir(...);
boost::filesystem::path vis_dir(...);

cv::Mat flow = FlowIOOpenCVWrapper::read(in_file.string());

boost::filesystem::path txt_path = out_dir / in_file.filename();
IO::writeMat(txt_path.string() + ".txt", flow);

if (visualize) {
    cv::Mat image = FlowIOOpenCVWrapper::flowToColor(flow);

    boost::filesystem::path image_path = vis_dir / in_file.filename();
    cv::imwrite(image_path.string() + ".png", image);
}

License

See lib/README-FlowIO.md and lib/imageLib/README.md for license information. The OpenCV wrapper and the corresponding command line tool are licensed as follows:

Copyright (c) 2015, David Stutz All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice,this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].