microsoft / HoloLens2ForCV

Sample code and documentation for using the Microsoft HoloLens 2 for Computer Vision research.
MIT License
494 stars 144 forks source link

Bug in save_pclouds.py (L162-L166) #47

Closed weders closed 4 years ago

weders commented 4 years ago

There are wrong indices to generate the paths in rgb.txt/depth.txt.

rgb_parts = Path(rgb_proj_path).parts[2:]
rgb_tmp = Path(rgb_parts[1]) / Path(rgb_parts[2])
depth_parts = Path(depth_proj_path).parts[2:]
depth_tmp = Path(depth_parts[1]) / Path(depth_parts[2])

This should be changed to:

# Create rgb and depth paths
rgb_parts = Path(rgb_proj_path).parts[2:]
rgb_tmp = Path(rgb_parts[-2]) / Path(rgb_parts[-1])
depth_parts = Path(depth_proj_path).parts[2:]
depth_tmp = Path(depth_parts[-2]) / Path(depth_parts[-1])

Then, the paths are correct. Otherwise, tsdf-integration.py does not find the files and reconstruction fails.

kysucix commented 4 years ago

There is an associated #29 to solve this bug. Let me include that.