(gt_path)
| 50 | return camera_df |
| 51 | |
| 52 | def 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 | |
| 66 | def load_image_data(file_path): |
| 67 | with open(file_path, 'r') as file: |
no test coverage detected