GitHunt
RO

rodolfoap/dense_optical_flow

Dense optical flow detection using OpenCV's Gunnar Farneback’s algorithm. An example is included: taking a video showing a crowd in movement, the people movement can be described with a set of vectors.

Dense Optical Flow

Dense optical flow matrix using OpenCV's Gunnar Farneback’s algorithm.

Compilation

cd src
mkdir build && pushd !!
cmake ..
make
popd

Usage

./main VIDEO_FILE.mp4

Output sample

  • ACCELERATION=0.1

  • ACCELERATION=0.9

Tools

ffmpeg -y -i KTH-Final-0TbZXdhqvA.mp4 -ss 50 -vf eq=brightness=-0.3:contrast=-0.5:saturation=0.5,scale=800:-1 -an KTH-Final-0TbZXdhqvA-640.mp4
ffmpeg -y -i 2020-05-12_08-14-26.mp4 -filter:v "crop=760:420:0:0" out.mp4; mplayer out.mp4

Credits

Languages

C++74.3%CMake15.8%Logos10.0%
GNU Affero General Public License v3.0
Created May 12, 2020
Updated October 18, 2024
rodolfoap/dense_optical_flow | GitHunt