1、在github上下载代码png_to_klg
git clone https://github.com/HTLife/png_to_klg
2、将png_to_klg目录下的associate.py文件复制到TUM数据集目录下,在此目录下运行:
./associate.py depth.txt rgb.txt > associations.txt
3、进入png_to_klg目录下运行:(../../freiburg2/rgbd_dataset_freiburg2_rpy为数据集目录,../../freiburg2/rpy.klg为生成的文件名及位置)
cd png_to_klg
mkdir build
cd build
cmake ..
make
./pngtoklg -w '../../freiburg2/rgbd_dataset_freiburg2_rpy' -o '../../freiburg2/rpy.klg' -t