openlifu.nav.photoscan.run_reconstruction¶
- openlifu.nav.photoscan.run_reconstruction(images: list[Path], pipeline_name: str = 'default_pipeline', input_resize_width: int = 3024, use_masks: bool = True, window_radius: int | None = None, return_durations: bool = False, progress_callback: Callable[[int, str], None] | None = None) → Tuple[Photoscan, Path] | Tuple[Photoscan, Path, Dict[str, float]][source]¶
Run Meshroom with the given images and pipeline. :param images: List of image file paths. :type images: list[Path] :param pipeline_name: Name of the Meshroom pipeline in meshroom_pipelines folder.
See also get_meshroom_pipeline_names.
- Parameters:
input_resize_width (int) – Width to which input images will be resized, in pixels.
use_masks (bool) – Whether to include a background removal step to filter the dense reconstruction.
window_radius (Optional[int]) – number of images forward and backward in the sequence to try and match with, if None match each images to all others.
return_durations (bool) – If True, also return a dictionary mapping node names to durations in seconds.
progress_callback – An optional function that will be called to report progress. The function should accept two arguments: an integer progress value from 0 to 100 followed by a string message describing the step currently being worked on.
- Returns:
If return_durations is False: returns the Photoscan and the data directory path.
If return_durations is True: also returns a dictionary of node execution times.
- Return type:
Union[Tuple[Photoscan, Path], Tuple[Photoscan, Path, Dict[str, float]]]