mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
add python binding and tests for composePanorama
fix tests pick 54039c2afd add python binding and tests for composePanorama
This commit is contained in:
parent
f162c08cda
commit
f2ca7e664a
@ -264,7 +264,7 @@ public:
|
||||
@param pano Final pano.
|
||||
@return Status code.
|
||||
*/
|
||||
Status composePanorama(InputArrayOfArrays images, OutputArray pano);
|
||||
CV_WRAP Status composePanorama(InputArrayOfArrays images, OutputArray pano);
|
||||
|
||||
/** @overload */
|
||||
CV_WRAP Status stitch(InputArrayOfArrays images, OutputArray pano);
|
||||
|
@ -19,5 +19,36 @@ class stitching_test(NewOpenCVTests):
|
||||
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))
|
||||
|
||||
|
||||
class stitching_compose_panorama_test_no_args(NewOpenCVTests):
|
||||
|
||||
def test_simple(self):
|
||||
|
||||
img1 = self.get_sample('stitching/a1.png')
|
||||
img2 = self.get_sample('stitching/a2.png')
|
||||
|
||||
stitcher = cv.createStitcher(False)
|
||||
|
||||
stitcher.estimateTransform((img1, img2))
|
||||
|
||||
result, _ = stitcher.composePanorama()
|
||||
|
||||
assert result == 0
|
||||
|
||||
|
||||
class stitching_compose_panorama_args(NewOpenCVTests):
|
||||
|
||||
def test_simple(self):
|
||||
|
||||
img1 = self.get_sample('stitching/a1.png')
|
||||
img2 = self.get_sample('stitching/a2.png')
|
||||
|
||||
stitcher = cv.createStitcher(False)
|
||||
|
||||
stitcher.estimateTransform((img1, img2))
|
||||
result, _ = stitcher.composePanorama((img1, img2))
|
||||
|
||||
assert result == 0
|
||||
|
||||
if __name__ == '__main__':
|
||||
NewOpenCVTests.bootstrap()
|
||||
|
Loading…
Reference in New Issue
Block a user