| 439 | |
| 440 | |
| 441 | def write_model(cameras, images, points3D, path, ext=".bin"): |
| 442 | if ext == ".txt": |
| 443 | write_cameras_text(cameras, os.path.join(path, "cameras" + ext)) |
| 444 | write_images_text(images, os.path.join(path, "images" + ext)) |
| 445 | write_points3D_text(points3D, os.path.join(path, "points3D") + ext) |
| 446 | else: |
| 447 | write_cameras_binary(cameras, os.path.join(path, "cameras" + ext)) |
| 448 | write_images_binary(images, os.path.join(path, "images" + ext)) |
| 449 | write_points3D_binary(points3D, os.path.join(path, "points3D") + ext) |
| 450 | return cameras, images, points3D |
| 451 | |
| 452 | |
| 453 | def qvec2rotmat(qvec): |