mirror of https://github.com/opencv/opencv.git
Open Source Computer Vision Library
https://opencv.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
662 B
24 lines
662 B
7 years ago
|
#!/usr/bin/env python
|
||
7 years ago
|
import cv2 as cv
|
||
7 years ago
|
|
||
|
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')
|
||
|
|
||
7 years ago
|
stitcher = cv.createStitcher(False)
|
||
7 years ago
|
(_result, pano) = stitcher.stitch((img1, img2))
|
||
7 years ago
|
|
||
7 years ago
|
#cv.imshow("pano", pano)
|
||
|
#cv.waitKey()
|
||
7 years ago
|
|
||
|
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))
|
||
7 years ago
|
|
||
|
if __name__ == '__main__':
|
||
|
NewOpenCVTests.bootstrap()
|