/video_stabilizer_node

Simple ROS node for stabilizing video based on four fixed points

Primary LanguageCMake

Videos stabilizer node for ROS

This ROS node is able to stabilize a video. The node locates four predefined reference points and transforms the image so that the reference points always are in the same location. The location os the four reference points in the initial frame is specied in the constructor to the VideoStabilizer class.

The test.mp4 video that was used to test the package is not part of the git repository. It can however be downloaded from youtube on the link.

Getting started

To get the system in a working state, the following steps should be taken.

  1. Make a ROS workspace
mkdir -p ~/ros_workspace/src
  1. Clone the git repository of the project and its dependencies
cd ~/ros_workspace/src
git clone git@github.com:henrikmidtiby/video_stabilizer_node.git
git clone git@github.com:ros-drivers/video_stream_opencv.git
  1. Download the youtube video using youtube-dl
cd ~/ros_workspace/src/video_stabilizer_node/data
youtube-dl -o test.mp4 -f 137 https://youtu.be/UA1zPvjSbjs
  1. Run catkin build
cd ~/ros_workspace
source /opt/ros/melodic/setup.bash 
catkin build
  1. Run the stabilizer,
cd ~/ros_workspace
source devel/setup.bash
roslaunch video_stabilizer_node test.launch