November 2018
Intermediate to advanced
492 pages
12h 19m
English
The following diagram shows how to reconstruct an image from only its Laplacian pyramid, if we construct one by following the algorithms described in the previous section:

Take a look at the following code block:
def reconstruct_image_from_laplacian_pyramid(pyramid): i = len(pyramid) - 2 prev = pyramid[i+1] pylab.figure(figsize=(20,20)) j = 1 while i >= 0: prev = resize(pyramid_expand(prev, upscale=2), pyramid[i].shape) im = np.clip(pyramid[i] + prev,0,1) pylab.subplot(3,3,j), pylab.imshow(im) pylab.title('Level=' + str(j) + ' ' + str(im.shape[0]) + 'x' + str(im.shape[1]), size=20) prev ...Read now
Unlock full access