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

Function load_colmap_camera

utils/readgt_colmap.py:52–64  ·  view source on GitHub ↗
(gt_path)

Source from the content-addressed store, hash-verified

50 return camera_df
51
52def load_colmap_camera(gt_path):
53 camera_path = gt_path + "/sparse/cameras.txt"
54 camera_df = load_camera_data(camera_path)
55 results = {}
56 for camera_id, row in camera_df.iterrows():
57 K = row['K']
58 results[camera_id] = {
59 "model" : "PINHOLE",
60 "width" :row['width'],
61 "height": row['height'],
62 "params": [K[0,0], K[1,1], K[0,2], K[1,2]]
63 }
64 return results
65
66def load_image_data(file_path):
67 with open(file_path, 'r') as file:

Callers 1

5_test_ceres.pyFile · 0.90

Calls 1

load_camera_dataFunction · 0.85

Tested by

no test coverage detected