MCPcopy Create free account
hub / github.com/colmap/colmap / split_image_name

Method split_image_name

python/examples/panorama_sfm.py:299–305  ·  view source on GitHub ↗

Split a rendered image name into (virtual camera idx, pano name).

(self, image_name: str)

Source from the content-addressed store, hash-verified

297 raise RuntimeError(f"Cannot write {mask_path}")
298
299 def split_image_name(self, image_name: str) -> tuple[int, str]:
300 """Split a rendered image name into (virtual camera idx, pano name)."""
301 for cam_idx, rig_camera in enumerate(self.rig_config.cameras):
302 prefix = rig_camera.image_prefix
303 if image_name.startswith(prefix):
304 return cam_idx, image_name[len(prefix) :]
305 raise ValueError(f"Unknown virtual camera for image {image_name!r}.")
306
307 def convert_to_equirectangular(
308 self, reconstruction: pycolmap.Reconstruction

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected