The Laplacian pyramid from an input image can be computed using the scikit-image.transform.pyramid module's pyramid_laplacian() function. Starting with the difference image of original image and its smoothed version, the function computes the down-sampled and the smoothed image, and takes the difference of these two images to compute the image corresponding to each layer recursively. Motivation for creating a Laplacian pyramid is to achieve compression, since the compression rates are higher for predictable values around 0.
The code to compute the Laplacian pyramid is similar to that of the previous code for computing the Gaussian pyramid; it is left as an exercise for the reader. ...