This released code is the VO part of HSO based on SVO and PL-SVO.
Authors: Dongting Luo, Yan Zhuang and Sen Wang.
Video: https://youtu.be/AchJQ2u8K50 or https://v.youku.com/v_show/id_XNDgyMjY4ODc4OA
I am looking for a PhD position. If you think my work and research direction meet the needs of your Lab, please contact me (luo_dt@vip.163.com).
- Dongting Luo, Yan Zhuang and Sen Wang. Hybrid Sparse Monocular Visual Odometry with Online Photometric Calibration. In International Journal of Robotics Research
c++ Librairies (thread and system are needed). Install with
sudo apt-get install libboost-all-dev
Linear algebra.
sudo apt-get install libeigen3-dev
Dowload and install instructions can be found at: http://opencv.org. We tested the code on OpenCV 3.2.0.
Used for 3D visualization & the GUI. Dowload and install instructions can be found at: https://github.com/stevenlovegrove/Pangolin. If you encounter difficulties in compiling the latest version of Pangolin, I put an old version in the thirdparty folder, which is easier to complie.
The three libraries will be compiled automatically using script build.sh
.
We have tested the code on Ubuntu 14.04, 16.04, 18.04 and 20.04. A newer Ubuntu platform may also be easy to install.
cd hso
chmod +x build.sh
./build.sh
This will create the executable test_dataset
in the bin folder.
- Download the dataset from http://projects.asl.ethz.ch/datasets/doku.php?id=kmavvisualinertialdatasets and uncompress it.
- Go to the test folder and open the script
euroc_batch.sh
. - Change pathDatasetEuroc variable to point to the directory where the dataset has been uncompressed and sequenceName variables to the name of each sequence in your computer.
- Execute the script: ./euroc_batch.sh
- The result of keyframes trajectory will be saved in the result folder using TUM format.
- Download the dataset from http://www.doc.ic.ac.uk/~ahanda/VaFRIC/iclnuim.html (select ICL-NUIM PNGs) and uncompress it.
- Go to the test folder and open the script
icl-nuim_batch.sh
. - Change pathDatasetICL variable to point to the directory where the dataset has been uncompressed and sequece_name variables to the name of each sequence in your computer.
- Execute the script: ./icl-nuim_batch.sh
- The result of keyframes trajectory will be saved in the result folder using TUM format.
- Download the dataset from https://vision.in.tum.de/mono-dataset and uncompress it.
- Uncompress the images.zip in each sequence.
- Go to the test folder and open the script
tum_monoVO_batch.sh
. - Change pathDatasetTUM variable to point to the directory where the dataset has been uncompressed and sequece_num variables to the name of each sequence in your computer.
- Execute the script: ./tum_monoVO_batch.sh
- The result of keyframes trajectory will be saved in the result folder using TUM format.
The minimal usage is
cd test
./single_sequence.sh
Change pathImageFolder
in the script to the folder containing images, and cameraCalibFile
to the geometric camera calibration file. HSO now support 3 types of camera model, please see below.
The result will be saved in the result folder.
Pinhole fx fy cx cy k1 k2 p1 p2
width height
true / false
FOV fx fy cx cy omega
width height
true / false
EquiDistant fx fy cx cy k1 k2 r1 r2
width height
true / false
When the image is taken with a fisheye camera, then fill in "true" in the third line, otherwise "false". Some camera file examples are saved in ./test/cameras.
If you use single_sequence.sh
to run HSO, there are several commandline options you can use:
-
image=X
where X is the folder containing images. -
calib=X
where X is the geometric camera calibration file.
-
start=X
: Start at frame X. The default is 0. HSO’s monocular initialization is weak. When the initialization fails or there is a problem with the initial scale, we recommend skipping some beginning frames (e.g., start=450 in MH04). -
end=X
: End at frame X. The default is the number of the images the folder contains. -
times=X
: The timestamp file of the images. Its number of lines must be equal to the number of images in the folder. HSO now support 4 types of timestamp file format, please see the fileImageReader.cpp
. The default is "None". -
name=X
: The file name of the result. The default is "KeyFrameTrajectory.txt".
The source code is released under a GPLv3 licence.
If you use HSO in your academic work, please cite:
@article{Luo2022,
title={Hybrid Sparse Monocular Visual Odometry with Online Photometric Calibration},
author={Dongting Luo, Yan Zhuang and Sen Wang},
journal={International Journal of Robotics Research},
year={2022}
}