diff --git a/samples/python2/common.py b/samples/python2/common.py index 0eb49b8ea6..085accd2be 100644 --- a/samples/python2/common.py +++ b/samples/python2/common.py @@ -190,3 +190,7 @@ def mosaic(w, imgs): imgs = it.chain([img0], imgs) rows = grouper(w, imgs, pad) return np.vstack(map(np.hstack, rows)) + +def getsize(img): + h, w = img.shape[:2] + return w, h diff --git a/samples/python2/lappyr.py b/samples/python2/lappyr.py new file mode 100644 index 0000000000..6199c22e7b --- /dev/null +++ b/samples/python2/lappyr.py @@ -0,0 +1,64 @@ +''' An example of Laplacian Pyramid construction and merging. + +Level : Intermediate + +Usage : python lappyr.py [