def test_fitzgibbon_cvpr_2001_results(self): """Check the expected result.""" sols = homlib.get_fitzgibbon_cvpr_2001(np.asfortranarray(self.p1), np.asfortranarray(self.p2)) np.testing.assert_almost_equal(sols['lam'], -0.6554778901775142, self.tol) verify(verify_numpy_array(sols['H']))
def test_valtonenornhag_arxiv_2020b_frHfr(self): p1 = np.array([ [-1.146281331283839, 1.050109134098990, 1.065996624259908], [-0.879951300627967, 0.620743795713172, 0.541580087112080], ]) p2 = np.array([ [0.663628650450811, 1.333268512835822, 1.318951998842419], [1.241359691717976, 0.068745345721370, 0.016786262835316], ]) R1 = np.array([ [-0.320761154096478, 0.935110133718446, 0.150603186685294], [-0.808554515336552, -0.353152142517100, 0.470662469254195], [0.493307082608358, 0.029199350209406, 0.869365009760445], ]) R2 = np.array([ [0.420952545706761, -0.744893719609945, -0.517621773835547], [0.652124812245433, -0.148125936460580, 0.743499788972085], [-0.630501533318403, -0.650532130976893, 0.423409687005158], ]) sols = homlib.get_valtonenornhag_arxiv_2020b_frHfr( np.asfortranarray(p1), np.asfortranarray(p2), np.asfortranarray(R1), np.asfortranarray(R2)) np.testing.assert_almost_equal(sols['lam'], -0.45054159850239145, self.tol) np.testing.assert_almost_equal(sols['f'], 5.756798219531202, self.tol) verify(verify_numpy_array(sols['H']))
def test_get_kukelova_cvpr_2015_sol4(self): sols = homlib.get_kukelova_cvpr_2015(np.asfortranarray(self.p1), np.asfortranarray(self.p2)) np.testing.assert_almost_equal(sols[4]['lam1'], -0.6554778901775545, self.tol) np.testing.assert_almost_equal(sols[4]['lam2'], -0.6554778901775485, self.tol) verify(verify_numpy_array(sols[4]['H']))
def test_get_kukelova_cvpr_2015_sol0(self): sols = homlib.get_kukelova_cvpr_2015(np.asfortranarray(self.p1), np.asfortranarray(self.p2)) np.testing.assert_almost_equal(sols[0]['lam1'], 0.2537509800067458, self.tol) np.testing.assert_almost_equal(sols[0]['lam2'], -1.9785613160596929, self.tol) verify(verify_numpy_array(sols[0]['H']))
def test_get_kukelova_cvpr_2015_sol2(self): sols = homlib.get_kukelova_cvpr_2015(np.asfortranarray(self.p1), np.asfortranarray(self.p2)) np.testing.assert_almost_equal(sols[2]['lam1'], -1.7814746086320201, self.tol) np.testing.assert_almost_equal(sols[2]['lam2'], -2.079301697963529, self.tol) verify(verify_numpy_array(sols[2]['H']))
def test_get_kukelova_cvpr_2015_sol1(self): sols = homlib.get_kukelova_cvpr_2015(np.asfortranarray(self.p1), np.asfortranarray(self.p2)) np.testing.assert_almost_equal(sols[1]['lam1'], -1.1832137508476386, self.tol) np.testing.assert_almost_equal(sols[1]['lam2'], -1.8809663034629707, self.tol) verify(verify_numpy_array(sols[1]['H']))
def test_get_kukelova_cvpr_2015_sol3(self): sols = homlib.get_kukelova_cvpr_2015(np.asfortranarray(self.p1), np.asfortranarray(self.p2)) np.testing.assert_almost_equal(sols[3]['lam1'], -2.136402668559706, self.tol) np.testing.assert_almost_equal(sols[3]['lam2'], 0.6928831549898077, self.tol) verify(verify_numpy_array(sols[3]['H']))
def test_valtonenornhag_arxiv_2020a_fHf_results(self): """Check the expected result.""" sols = homlib.get_valtonenornhag_arxiv_2020a_fHf( np.asfortranarray(self.p1), np.asfortranarray(self.p2), np.asfortranarray(self.R1), np.asfortranarray(self.R2) ) np.testing.assert_almost_equal(sols['f'], 1.194848331672758, self.tol) verify(verify_numpy_array(sols['H']))
def test_valtonenornhag_arxiv_2021_fEf_sol1(self): np.testing.assert_almost_equal(self.sols[1]['f'], -10.455953354057023, self.tol) verify(verify_numpy_array(self.sols[1]['F']))
def test_valtonenornhag_arxiv_2021_fEf_sol0(self): np.testing.assert_almost_equal(self.sols[0]['f'], 5.998701610439096, self.tol) verify(verify_numpy_array(self.sols[0]['F']))
def test_valtonenornhag_arxiv_2021_frEfr_sol8_t(self): verify(verify_numpy_array(self.sols[8]['t']))
def test_valtonenornhag_arxiv_2021_frEfr_sol8(self): np.testing.assert_almost_equal(self.sols[8]['f'], 944.9706198704850, self.tol) np.testing.assert_almost_equal(self.sols[8]['r'], 483098.2018965589, self.tol) verify(verify_numpy_array(self.sols[8]['F']))
def test_valtonenornhag_arxiv_2021_frEfr_sol7(self): np.testing.assert_almost_equal(self.sols[7]['f'], 96.42064345373980, self.tol) np.testing.assert_almost_equal(self.sols[7]['r'], -1845837.551419409, self.tol) verify(verify_numpy_array(self.sols[7]['F']))
def test_valtonenornhag_arxiv_2021_rEr_sol0(self): np.testing.assert_almost_equal(self.sols[0]['f'], 1.0, self.tol) np.testing.assert_almost_equal(self.sols[0]['r'], -4.287487605107101e-05, self.tol) verify(verify_numpy_array(self.sols[0]['F']))
def test_valtonenornhag_arxiv_2021_rEr_sol2_t(self): verify(verify_numpy_array(self.sols[2]['t']))
def test_valtonenornhag_arxiv_2021_fEf_sol3_t(self): verify(verify_numpy_array(self.sols[3]['t']))
def test_valtonenornhag_arxiv_2021_frEfr_sol3(self): np.testing.assert_almost_equal(self.sols[3]['f'], 2291.313422912460, self.tol) np.testing.assert_almost_equal(self.sols[3]['r'], 9774.556116633164, self.tol) verify(verify_numpy_array(self.sols[3]['F']))
def test_valtonenornhag_arxiv_2021_frEfr_sol2(self): np.testing.assert_almost_equal(self.sols[2]['f'], 2445.470419511240, self.tol) np.testing.assert_almost_equal(self.sols[2]['r'], 1.987432298474289e-08, self.tol) verify(verify_numpy_array(self.sols[2]['F']))
def test_valtonenornhag_arxiv_2021_frEfr_sol1(self): np.testing.assert_almost_equal(self.sols[1]['f'], -4414.62813326810, self.tol) np.testing.assert_almost_equal(self.sols[1]['r'], -86722.00865063918, self.tol) verify(verify_numpy_array(self.sols[1]['F']))
def test_valtonenornhag_arxiv_2021_frEfr_sol0(self): np.testing.assert_almost_equal(self.sols[0]['f'], -125306.614892352, self.tol) np.testing.assert_almost_equal(self.sols[0]['r'], -203321.4180906687, self.tol) verify(verify_numpy_array(self.sols[0]['F']))
def test_valtonenornhag_arxiv_2021_fEf_sol2(self): np.testing.assert_almost_equal(self.sols[2]['f'], 51.61046271601693, self.tol) verify(verify_numpy_array(self.sols[2]['F']))
def test_valtonenornhag_arxiv_2021_rEr_sol2(self): np.testing.assert_almost_equal(self.sols[2]['f'], 1.0, self.tol) np.testing.assert_almost_equal(self.sols[2]['r'], 0.0018460404126675477, self.tol) verify(verify_numpy_array(self.sols[2]['F']))
def test_valtonenornhag_arxiv_2021_fEf_sol3(self): np.testing.assert_almost_equal(self.sols[3]['f'], -37.468067324800963, self.tol) verify(verify_numpy_array(self.sols[3]['F']))
def test_valtonenornhag_arxiv_2021_rEr_sol3(self): np.testing.assert_almost_equal(self.sols[3]['f'], 1.0, self.tol) np.testing.assert_almost_equal(self.sols[3]['r'], -0.0010992419476161233, self.tol) verify(verify_numpy_array(self.sols[3]['F']))
def test_valtonenornhag_arxiv_2021_frEfr_sol4(self): np.testing.assert_almost_equal(self.sols[4]['f'], -75.4204581489593, self.tol) np.testing.assert_almost_equal(self.sols[4]['r'], 190060.1388957948, self.tol) verify(verify_numpy_array(self.sols[4]['F']))
def test_valtonenornhag_arxiv_2021_rEr_sol1(self): np.testing.assert_almost_equal(self.sols[1]['f'], 1.0, self.tol) np.testing.assert_almost_equal(self.sols[1]['r'], -0.00024691393053107155, self.tol) verify(verify_numpy_array(self.sols[1]['F']))
def test_valtonenornhag_arxiv_2021_frEfr_sol7(self): np.testing.assert_almost_equal(self.sols[7]['f'], 96.42064345387635, self.tol) np.testing.assert_almost_equal(self.sols[7]['r'], -6.347201002333305e-06, self.tol) verify(verify_numpy_array(self.sols[7]['F']))
def test_valtonenornhag_arxiv_2021_frEfr_sol6(self): np.testing.assert_almost_equal(self.sols[6]['f'], 7.142069186813480, self.tol) np.testing.assert_almost_equal(self.sols[6]['r'], -10387926.073495165, self.tol) verify(verify_numpy_array(self.sols[6]['F']))
def test_valtonenornhag_arxiv_2021_frEfr_sol5(self): np.testing.assert_almost_equal(self.sols[5]['f'], 1081.280695559530, self.tol) np.testing.assert_almost_equal(self.sols[5]['r'], -15606.02225174152, self.tol) verify(verify_numpy_array(self.sols[5]['F']))
def test_valtonenornhag_arxiv_2021_frEfr_sol8(self): np.testing.assert_almost_equal(self.sols[8]['f'], 944.9706198704988, self.tol) np.testing.assert_almost_equal(self.sols[8]['r'], 1.6612086957195312e-06, self.tol) verify(verify_numpy_array(self.sols[8]['F']))