The Gaussian pyramid can be computed with the following steps:
- Start with the original image.
- Iteratively compute the image at each level of the pyramid, first by smoothing the image (with the Gaussian filter) and then down-sampling it.
- Stop at a level where the image size becomes sufficiently small (for example, 1 x 1).
- The function to implement the previous algorithm is left as an exercise for the reader; we just need to add a few lines in the following function to complete the implementation:
from skimage.transform import pyramid_reduce def get_gaussian_pyramid(image): ''' input: an RGB image output: the Gaussian Pyramid of the image as a list ''' gaussian_pyramid = [] # add code here # iteratively ...