[opencv] 188/251: python: stitching simple test

Nobuhiro Iwamatsu iwamatsu at moszumanska.debian.org
Sun Aug 27 23:27:41 UTC 2017


This is an automated email from the git hooks/post-receive script.

iwamatsu pushed a commit to annotated tag 3.3.0
in repository opencv.

commit 15a658606221be43db9f9397f2ac3eea9451a2bb
Author: Alexander Alekhin <alexander.alekhin at intel.com>
Date:   Sun Jul 30 13:52:27 2017 +0300

    python: stitching simple test
---
 modules/python/test/test_stitching.py | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/modules/python/test/test_stitching.py b/modules/python/test/test_stitching.py
new file mode 100644
index 0000000..9a35357
--- /dev/null
+++ b/modules/python/test/test_stitching.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python
+import cv2
+
+from tests_common import NewOpenCVTests
+
+class stitching_test(NewOpenCVTests):
+
+    def test_simple(self):
+
+        img1 = self.get_sample('stitching/a1.png')
+        img2 = self.get_sample('stitching/a2.png')
+
+        stitcher = cv2.createStitcher(False)
+        (result, pano) = stitcher.stitch((img1, img2))
+
+        #cv2.imshow("pano", pano)
+        #cv2.waitKey()
+
+        self.assertAlmostEqual(pano.shape[0], 685, delta=100, msg="rows: %r" % list(pano.shape))
+        self.assertAlmostEqual(pano.shape[1], 1025, delta=100, msg="cols: %r" % list(pano.shape))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git



More information about the debian-science-commits mailing list