Skip to content

Commit 99221df

Browse files
authored
Merge pull request #852 from Kaggle/adding-pydegensac
Adding pydegensac
2 parents a901aa3 + 811253d commit 99221df

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ RUN pip install flashtext && \
440440
pip install cloud-tpu-client && \
441441
pip install tensorflow-datasets && \
442442
pip install pydub && \
443+
pip install pydegensac && \
443444
/tmp/clean-layer.sh
444445

445446
# Tesseract and some associated utility packages

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)