import pickle


def load_calibration_data(path):
    """
    Load camera matrix and distortion coefficients from a pickled file

    Inputs
    ----------
    path: str
        Path to where the data will be saved

    Outputs
    -------
    mtx: numpy.ndarray
        Camera matrix
    dist: numpy.ndarray
        Camera distortion coefficients

    """

    with open(path, mode = 'rb') as f:
        data = pickle.load(f)

    mtx = data['mtx']
    dist = data['dist']

    return mtx, dist