This project provides tools to help with the manipulation of the footage. The currently available tools are
- the calibration of the camera using a checkerboard (tools/calibrate.cpp),
- the undistortion of the footage (tools/undistort.cpp),
- the stabilization of the footage (tools/undistort.cpp) and
- the splitting of the footage into sub rectangles. (tools/split_vid)
- C++11 compiler
- OpenCV2
- BOOST libraries
- CMake
- Install dependencies if not already done.
- Make a new directory to compile the code into
$> mkdir manip_bin
- Change into that directory
$> cd manip_bin
- CMake the project
$> cmake ..
- Make the project
$> make
- Run the tool you want to use
$> tools/[Your tool of choice]
This is the calibration software for the camera.
Usage: tools/calibrate [options] <horiz> <vert> <input>
Options:
-h [ --help ] Print help messages
--horiz arg Number of horizontal corners
--vert arg Number of vertical corners
-i [ --input ] arg Input directory
-c [ --calibfn ] arg (=calib.yml) calibration filename
Takes in a directory that contains all the calibration images that you have with the checkerboard and writes the corresponding calibration output file.
This is the undistortion software for the camera.
Usage: tools/undistort [options] <calibfn> <footage>
Options:
-h [ --help ] Print help messages
-c [ --calibfn ] arg calibration filename
-f [ --footage ] arg footage file
Takes in the footage that you have recorded as well as the calibration file that was created from the calibration tool and undistorts the footage.
N.B. For now we do not save the video.
This is the stabilization software for the camera.
Usage: tools/stabilize [options] <footage>
Options:
-h [ --help ] Print help messages
-b [ --boxsize ] arg (=20) The size of the box that you search for the
best point to track in
-c [ --hcrop ] arg (=30) Horizontal Border Crop, crops the border to
reduce the black borders from stabilization
being too noticeable.
-m [ --manualframe ] arg (=0) Frame to do manual capturing on.
-s [ --scalefactor ] arg (=0.25) Scaling Factor for manual marking.
-f [ --footage ] arg footage file
-o [ --output ] arg (=output.avi) output file
When run, manually select the points that you want to track.
Takes in the footage that you have recorded and creates the corresponding stabilized footage.
This is the splitting software for the footage.
Usage: tools/split_vid [options] <footage> <numx> <numy>
Options:
-h [ --help ] Print help messages
-f [ --footage ] arg footage file
-x [ --numx ] arg number of x splits
-y [ --numy ] arg number of y splits
-t [ --timesplit ] arg (=1) number of time splits
-o [ --output ] arg (=.) output directory
Takes in the stabilized footage and splits it into the number of rectangles and time zones that you would like.