Esempio n. 1
0
def test_similarity_jacobian_2d():
    params = np.ones(4)
    t = DifferentiableSimilarity.init_identity(2).from_vector(params)
    explicit_pixel_locations = np.array([[0, 0], [0, 1], [0, 2], [1, 0],
                                         [1, 1], [1, 2]])
    dW_dp = t.d_dp(explicit_pixel_locations)
    assert_equal(dW_dp, sim_jac_solution2d)
Esempio n. 2
0
def test_similarity_jacobian_2d_raises_dimensionalityerror():
    params = np.ones(4)
    t = DifferentiableSimilarity.init_identity(2).from_vector(params)
    t.d_dp(np.ones([2, 3]))
Esempio n. 3
0
def test_similarity_jacobian_2d_raises_dimensionalityerror():
    params = np.ones(4)
    t = DifferentiableSimilarity.init_identity(2).from_vector(params)
    t.d_dp(np.ones([2, 3]))
Esempio n. 4
0
def test_similarity_jacobian_2d():
    params = np.ones(4)
    t = DifferentiableSimilarity.init_identity(2).from_vector(params)
    explicit_pixel_locations = np.array([[0, 0], [0, 1], [0, 2], [1, 0], [1, 1], [1, 2]])
    dW_dp = t.d_dp(explicit_pixel_locations)
    assert_equal(dW_dp, sim_jac_solution2d)