Example #1
0
File: io.py Project: borglab/gtsfm
def read_bundler(file_path: str) -> GtsfmData:
    """Read a Bundler file.

    Args:
        file_name: file path of the Bundler file.

    Returns:
        The data as an GtsfmData object.
    """
    sfm_data = gtsam.SfmData.FromBundlerFile(file_path)
    return GtsfmData.from_sfm_data(sfm_data)
Example #2
0
File: io.py Project: borglab/gtsfm
def read_bal(file_path: str) -> GtsfmData:
    """Read a Bundle Adjustment in the Large" (BAL) file.

    See https://grail.cs.washington.edu/projects/bal/ for more details on the format.


    Args:
        file_name: file path of the BAL file.

    Returns:
        The data as an GtsfmData object.
    """
    sfm_data = gtsam.readBal(file_path)
    return GtsfmData.from_sfm_data(sfm_data)