mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-12 12:30:16 +08:00
Add missing 0th layer of laplacian pyramid
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user