Giter VIP home page Giter VIP logo

real-time-video-stabilization's Introduction

Real-Time-Video-Stabilization

This is a basic implementation of a real time video stabilization algorithm based on my paper:
http://www.sciencedirect.com/science/article/pii/S1877050916314624

Prerequisites

The code requires the following 3rd Party Libraries

  • opencv-2.4.9
  • g++-5.4.1

How to Run

  • Clone the repository and compile using g++ and opencv.
  • Change the parameters of Kalman Filter in videostab.cpp. (optional)
  • Give the path of your input file or webcam in main.cpp.
  • Run the program using these dependencies: -lopencv_core -lopencv_calib3d -lopencv_imgcodecs -lopencv_highgui -lopencv_imgproc -lopencv_stitching -lopencv_videoio -lopencv_video -lopencv_xfeatures2d

Alternatively

  • The Linux branch of this repository includes a Makefile, run make to create the executable

real-time-video-stabilization's People

Contributors

jairajjangle avatar lakshya-kejriwal avatar yumathecompanion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

real-time-video-stabilization's Issues

Make file for video stabilisation

I am trying to find the make file of video stabilization code for the linux environment.Can anybody tell me the location of it.At the end of the "readme" it is mentioned that the make file is present in "linux" branch of the repository. But I am unable to find it....

'opencv2/nonfree/nonfree.hpp' file not found, where to find it?

Scanning dependencies of target video_stabilization
[ 33%] Building CXX object CMakeFiles/video_stabilization.dir/main.cpp.o
/Users/peng/Documents/YSG/OD_dev/Real-Time-Video-Stabilization-master/main.cpp:5:10: fatal error:
'opencv2/nonfree/nonfree.hpp' file not found
#include "opencv2/nonfree/nonfree.hpp"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/video_stabilization.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/video_stabilization.dir/all] Error 2
make: *** [all] Error 2

Homography matrix

How I understand, you use an affine transformation. How can I do this with homography transformation? How should I change smoothedMat for this?

Compiling problems...

I am compiling your code using this command and it seems to be working.

g++ $(pkg-config --cflags --libs /usr/local/Cellar/opencv@2/2.4.13.7_2/lib/pkgconfig/opencv.pc) -std=c++11 main.cpp videostab.cpp -o main.out && ./main.out

g++ $(pkg-config --cflags --libs /usr/local/Cellar/opencv@3/3.4.5/lib/pkgconfig/opencv.pc) -std=c++11 main.cpp videostab.cpp -o main.out

But I am getting this:

OpenCV Error: Assertion failed ((npoints = prevPtsMat.checkVector(2, CV_32F, true)) >= 0) in calcOpticalFlowPyrLK, file /tmp/opencv@2-20190104-5517-24qljy/opencv-2.4.13.7/modules/video/src/lkpyramid.cpp, line 845
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /tmp/opencv@2-20190104-5517-24qljy/opencv-2.4.13.7/modules/video/src/lkpyramid.cpp:845: error: (-215) (npoints = prevPtsMat.checkVector(2, CV_32F, true)) >= 0 in function calcOpticalFlowPyrLK

I am using openCV 2.4.13.7, and g++ (clang),

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

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.