MCPcopy Create free account
hub / github.com/Ropedia/SpatialBench / _parse_kitti_calib

Function _parse_kitti_calib

visualize_benchmark_web.py:1035–1048  ·  view source on GitHub ↗

解析 KITTI Odometry calib.txt → {key: (3,4) float32},key ∈ {P0,P1,P2,P3,Tr}。

(path: Path)

Source from the content-addressed store, hash-verified

1033
1034
1035def _parse_kitti_calib(path: Path) -> dict:
1036 """解析 KITTI Odometry calib.txt → {key: (3,4) float32},key ∈ {P0,P1,P2,P3,Tr}。"""
1037 out = {}
1038 with open(path) as f:
1039 for line in f:
1040 line = line.strip()
1041 if not line:
1042 continue
1043 key, _, vals = line.partition(':')
1044 parts = vals.split()
1045 if len(parts) < 12:
1046 continue
1047 out[key.strip()] = np.array([float(x) for x in parts[:12]], dtype=np.float32).reshape(3, 4)
1048 return out
1049
1050
1051def _parse_kitti_poses(path: Path) -> np.ndarray:

Callers 1

_load_kitti_odometryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected