MCPcopy Create free account
hub / github.com/InternRobotics/G2VLM / depth_read_bonn

Function depth_read_bonn

eval_code/recons/utils/depth.py:70–78  ·  view source on GitHub ↗
(filename: str)

Source from the content-addressed store, hash-verified

68
69
70def 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
81def depth_read_kitti(filename: str):

Callers 1

depth.pyFile · 0.85

Calls 1

openMethod · 0.80

Tested by

no test coverage detected