def parse_colmap_folder(
        idp,
        use_workspace_images,
        image_dp,
        image_fp_type,
        suppress_distortion_warnings=False,
        op=None,
    ):
        """Parse a :code:`Colmap` model or a :code:`Colmap` workspace."""
        log_report("INFO", "idp: " + str(idp), op)

        if ColmapFileHandler._is_valid_model_folder(idp):
            model_idp = idp
            mesh_ifp = None
            depth_map_idp = None
        elif ColmapFileHandler._is_valid_workspace_folder(idp):
            (
                model_idp,
                image_idp_workspace,
                depth_map_idp,
                mesh_ifp,
            ) = ColmapFileHandler._disassemble_colmap_workspace_folder(idp)
            if use_workspace_images and os.path.isdir(image_idp_workspace):
                image_dp = image_idp_workspace
                log_report("INFO", "Using image directory in workspace.", op)
        else:
            log_report("ERROR", "Invalid colmap model / workspace", op)
            assert False, "Invalid colmap model / workspace"

        log_report("INFO", "image_dp: " + image_dp, op)
        cameras, points = ColmapFileHandler.parse_colmap_model_folder(
            model_idp,
            image_dp,
            image_fp_type,
            depth_map_idp,
            suppress_distortion_warnings=suppress_distortion_warnings,
            op=op,
        )

        return cameras, points, mesh_ifp
Parse a :code:`Colmap` model or a :code:`Colmap` workspace.
photogrammetry_importer/file_handlers/colmap_file_handler.py