From 889df76ea7c38ad20031b678a582f77506e6c520 Mon Sep 17 00:00:00 2001 From: Alexander Mordvintsev Date: Sun, 10 Jun 2012 08:38:25 +0000 Subject: [PATCH] added lappyr.py sample --- samples/python2/common.py | 4 +++ samples/python2/lappyr.py | 64 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 samples/python2/lappyr.py 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 [