MCPcopy
hub / github.com/cvg/Hierarchical-Localization / write_model

Function write_model

hloc/utils/read_write_model.py:449–458  ·  view source on GitHub ↗
(cameras, images, points3D, path, ext=".bin")

Source from the content-addressed store, hash-verified

447
448
449def write_model(cameras, images, points3D, path, ext=".bin"):
450 if ext == ".txt":
451 write_cameras_text(cameras, os.path.join(path, "cameras" + ext))
452 write_images_text(images, os.path.join(path, "images" + ext))
453 write_points3D_text(points3D, os.path.join(path, "points3D") + ext)
454 else:
455 write_cameras_binary(cameras, os.path.join(path, "cameras" + ext))
456 write_images_binary(images, os.path.join(path, "images" + ext))
457 write_points3D_binary(points3D, os.path.join(path, "points3D") + ext)
458 return cameras, images, points3D
459
460
461def qvec2rotmat(qvec):

Callers 7

mainFunction · 0.90
create_reference_sfmFunction · 0.90
mainFunction · 0.90
scale_sfm_imagesFunction · 0.90
mainFunction · 0.85
build_empty_colmap_modelFunction · 0.85

Calls 7

write_cameras_textFunction · 0.85
write_images_textFunction · 0.85
write_points3D_textFunction · 0.85
write_cameras_binaryFunction · 0.85
write_images_binaryFunction · 0.85
write_points3D_binaryFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected