示例#1
0
 def test_kukelova_cvpr_2015_dimensions02(self):
     """Check that an exception is raised when dimensions are incorrect."""
     self.p2 = np.vstack((self.p2, np.ones((1, 5))))
     with self.assertRaises(ValueError):
         sols = homlib.get_kukelova_cvpr_2015(np.asfortranarray(self.p1),
                                              np.asfortranarray(
                                                  self.p2))  # noqa
示例#2
0
 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']))
示例#3
0
 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']))
示例#4
0
 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']))
示例#5
0
 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']))
示例#6
0
 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']))
示例#7
0
 def test_get_kukelova_cvpr_2015_length(self):
     sols = homlib.get_kukelova_cvpr_2015(np.asfortranarray(self.p1),
                                          np.asfortranarray(self.p2))
     assert len(sols) == 5