Make point cloud from a set of RGBD images (courtesy of TUM Sequence 'freiburg1_floor' dataset).
OpenCV: Build Instructions. PCL library: Build Instructions. TUM dataset: datasets.
After downloading the dataset, a few more steps needs to be done in order for the code to work.
- Go to src/generatePointCloud.cpp and change the dataset path to your dataset path.
- Using the association tool from TUM website here, associate rgb.txt and depth.txt into rgb_depth.txt. Then associate rgb_depth.txt and groundtruth.txt into rgb_depth_gt.txt and change the following in src/generatePointCloud.cpp.
In the Project folder, create a build directory using
mkdir build
compile using
cmake ../src
then generate binary using
make -j4
run the binary using
./generatPointCloud
You will get a .ply file. To view the file use meshlab.
the output folder has a .zip file containing a .ply file which is already generated and can be viewed using meshlab. The folder also has a vidoe demo of the same.
code is inspired from https://www.cnblogs.com/gary-guo/p/6542141.html. Blog about the explanation https://www.programmersought.com/article/8647778259/