MCPcopy Create free account
hub / github.com/Thinklab-SJTU/Bench2Drive / convert_depth

Function convert_depth

tools/utils.py:150–158  ·  view source on GitHub ↗

Computes the normalized depth from a CARLA depth map.

(data)

Source from the content-addressed store, hash-verified

148 return K
149
150def convert_depth(data):
151 """
152 Computes the normalized depth from a CARLA depth map.
153 """
154 data = data.astype(np.float16)
155
156 normalized = np.dot(data, [65536.0, 256.0, 1.0])
157 normalized /= (256 * 256 * 256 - 1)
158 return normalized * 1000
159
160def get_relative_transform(ego_matrix, vehicle_matrix):
161 """

Callers 1

tickMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected