- KalmanFilter.py A Kalman filter
- MothionAnalyser.py Analyze the motion of frames
- NCC.py GPU accelerated NCC algorithm
- Stabliser.py Entry of the whole toolkit
- utils.py Supporting functions
- Videoloader.py Load the video
- VideoProcessor.py Output the video, perform translation
Unfortunately, there is only the GPU version of the NCC algorithm... As a result you must have an Nvidia graphic card and a properly configured CUDA toolkit to run the code. The CuPy
package is also obligatory,
The script is tested on a host with Ubuntu 18.04 LTS, with an Intel i7 processor, an RTX 2060 Super graphic card and 16GB RAM.
- Install the
CuPy
with instructions from Installation Guide. TheCuPy
package names are different depending on the CUDA version you have installed on your host. For CUDA 10.1, executepip install cupy-cuda101
. - Install the OpenCV by
pip install opencv-python
andpip install opencv-python-contrib
- Install other necessary packages
- Run Stabliser.py with parameters, for example
python Stabliser.py --path_to_video ./videos/IMG_1442.MOV
- The output video is saved to
./output/
by default