Skip to content

Commit 811253d

Browse files
committed
Add pydegensac test
1 parent e501a61 commit 811253d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/test_pydegensac.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import unittest
2+
3+
import pydegensac
4+
import numpy as np
5+
6+
7+
class TestPydegensac(unittest.TestCase):
8+
def test_find_homography(self):
9+
src_pts = np.float32([ [0,0],[0,1],[1,1],[1,0] ]).reshape(-1,2)
10+
dst_pts = np.float32([ [0,0],[0,-1],[-1,-1],[-1,0] ]).reshape(-1,2)
11+
12+
H, mask = pydegensac.findHomography(src_pts, dst_pts, 4, 1)
13+
14+
self.assertEqual(3, len(H))
15+
self.assertEqual(4, len(mask))
16+
17+
18+

0 commit comments

Comments
 (0)