Add missing 0th layer of laplacian pyramid

This commit is contained in:
Johannes Schönberger
2012-09-08 15:24:14 +02:00
parent e6675dcda6
commit 8e14f5f073
2 changed files with 1 additions and 1 deletions
+1
View File
@@ -262,6 +262,7 @@ def build_laplacian_pyramid(image, max_layer=-1, downscale=2, sigma=None,
cols = image.shape[1]
prev_layer_image = image - _smooth(image, sigma, mode, cval)
yield prev_layer_image
# build downsampled images until max_layer is reached or downsampled image
# has size of 1 in one direction
-1
View File
@@ -33,7 +33,6 @@ def test_build_laplacian_pyramid():
pyramid = build_laplacian_pyramid(image, downscale=2)
for layer, out in enumerate(pyramid):
layer += 1
layer_shape = (rows / 2 ** layer, cols / 2 ** layer, dim)
assert_array_equal(out.shape, layer_shape)