(filename: str)
| 68 | |
| 69 | |
| 70 | def depth_read_bonn(filename: str): |
| 71 | # loads depth map D from png file |
| 72 | # and returns it as a numpy array |
| 73 | depth_png = np.asarray(Image.open(filename)) |
| 74 | # make sure we have a proper 16bit depth map here.. not 8bit! |
| 75 | assert np.max(depth_png) > 255 |
| 76 | depth = depth_png.astype(np.float64) / 5000.0 |
| 77 | depth[depth_png == 0] = -1.0 |
| 78 | return depth |
| 79 | |
| 80 | |
| 81 | def depth_read_kitti(filename: str): |