Commit ·
dd47670
1
Parent(s): cfa3b5c
fix2
Browse files
hoho2025/example_solutions.py
CHANGED
|
@@ -28,8 +28,10 @@ def read_colmap_rec(colmap_data):
|
|
| 28 |
|
| 29 |
|
| 30 |
def _cam_matrix_from_image(img):
|
| 31 |
-
"""Return (R
|
| 32 |
cfW = img.cam_from_world
|
|
|
|
|
|
|
| 33 |
try:
|
| 34 |
R = cfW.rotation.matrix()
|
| 35 |
t = cfW.translation
|
|
|
|
| 28 |
|
| 29 |
|
| 30 |
def _cam_matrix_from_image(img):
|
| 31 |
+
"""Return (R 3x3, t 3) from a pycolmap.Image, compatible with all pycolmap versions."""
|
| 32 |
cfW = img.cam_from_world
|
| 33 |
+
if callable(cfW):
|
| 34 |
+
cfW = cfW()
|
| 35 |
try:
|
| 36 |
R = cfW.rotation.matrix()
|
| 37 |
t = cfW.translation
|