(
args: argparse.Namespace,
sparse_path: Path,
sparse_gt_path: Path,
sparse_aligned_path: Path,
max_ref_model_error: float,
)
| 649 | |
| 650 | |
| 651 | def colmap_alignment( |
| 652 | args: argparse.Namespace, |
| 653 | sparse_path: Path, |
| 654 | sparse_gt_path: Path, |
| 655 | sparse_aligned_path: Path, |
| 656 | max_ref_model_error: float, |
| 657 | ) -> None: |
| 658 | if args.overwrite_alignment and sparse_aligned_path.exists(): |
| 659 | shutil.rmtree(sparse_aligned_path) |
| 660 | if sparse_aligned_path.exists(): |
| 661 | pycolmap.logging.info("Skipping alignment, as it already exists") |
| 662 | return |
| 663 | |
| 664 | if sparse_path.exists(): |
| 665 | sparse_aligned_path.mkdir(parents=True, exist_ok=True) |
| 666 | _run_with_log( |
| 667 | [ |
| 668 | args.colmap_path, |
| 669 | "model_aligner", |
| 670 | "--input_path", |
| 671 | sparse_path, |
| 672 | "--ref_model_path", |
| 673 | sparse_gt_path, |
| 674 | "--output_path", |
| 675 | sparse_aligned_path, |
| 676 | "--alignment_max_error", |
| 677 | str(max_ref_model_error), |
| 678 | ], |
| 679 | sparse_aligned_path.parent / "alignment.log", |
| 680 | check=False, |
| 681 | ) |
| 682 | |
| 683 | |
| 684 | def process_scene( |
no test coverage detected