def sampson_error_sl3_jacobian(H, x0, x1):
    JH = vstack(( dot(H, lie.SL3_BASIS[i]).reshape((1,9)) for i in range(8) )).T
    Jf = homography_sampson_helpers.jacobian(x0, x1, H)
    return dot(Jf, JH)
def sampson_error_jacobian(H, x0, x1):
    return homography_sampson_helpers.jacobian(x0, x1, H)