This is a very slow, toy implementation of the Lucas-Kanade Optical Flow algorithm for self-learning purposes. Methods including 2D convolution, taking image gradients and the least squares approximation of flow velocities were done from scratch.
See example output below:
- Clone the repository
git clone https://github.com/aswinvisva/optical_flow_algorithms.git- Make a build directory
mkdir build
cd build- Generate the MakeFile using CMake
cmake ../- Build the project
make- Run with a video of your choice
./OpticalFlowAlgorithms --video_dir