def generate_error_curve(i, start, stop, n):
    xi = np.copy(xi_pred)
    vs = (xi[i] + np.linspace(start, stop, n))
    errors = []
    for v in vs:
        xi[i] = v
        DG = exp_se3(xi)
        (estimated, mask) = warp(camera_parameters, I1, D0, DG)
        errors.append(error(I0, estimated, mask))
    errors = np.array(errors)
    return (vs, errors)
def generate_error_curve(i, start, stop, n):
    xi = np.copy(xi_pred)
    vs = (xi[i] + np.linspace(start, stop, n))
    errors = []
    for v in vs:
        xi[i] = v
        DG = exp_se3(xi)
        (estimated, mask) = warp(camera_parameters, I1, D0, DG)
        errors.append(error(I0, estimated, mask))
    errors = np.array(errors)
    return (vs, errors)