Computes the normalized depth from a CARLA depth map.
(data)
| 148 | return K |
| 149 | |
| 150 | def 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 | |
| 160 | def get_relative_transform(ego_matrix, vehicle_matrix): |
| 161 | """ |