MCPcopy Create free account
hub / github.com/ComputationalRobotics/XM-code / load_BAL_gt

Function load_BAL_gt

utils/readgt_BAL.py:10–28  ·  view source on GitHub ↗
(dataset_path)

Source from the content-addressed store, hash-verified

8# TODO: don't know intrinsics
9
10def load_BAL_gt(dataset_path):
11 results = {}
12 # load all image names in 'image' folder
13 gtR_PATH = dataset_path + "/gtR.bin"
14 gtT_PATH = dataset_path + "/gtt.bin"
15 # load gt
16 gtR, _ = load_matrix_from_bin(gtR_PATH)
17 gtT, _ = load_matrix_from_bin(gtT_PATH)
18 N = gtT.shape[1]
19 for i in range(N):
20 # transform to world-2-camera
21 R = gtR[:,3*i:3*(i+1)]
22 t = gtT[:,i]
23 results[i] = {
24 "R": R,
25 "t": t,
26 "camera_id": 1
27 }
28 return results
29
30def load_replica_camera(dataset_path):
31 results = {}

Callers 1

Calls 1

load_matrix_from_binFunction · 0.90

Tested by

no test coverage detected