Burt-Adelson Pyramid

download notebookDownload this example as a Mathematica notebook.

Here is a demonstration of how to compute the well-known Burt-Adelson image pyramid [Peter J. Burt and Edward H. Adelson, "The Laplacian Pyramid as a Compact Image Code," IEEE Transactions on Communication 31, no. 4 (1983) 532-540]. Note that by using Mathematica's powerful functional programming constructs, the Gaussian and Laplacian pyramids are computed with one-line programs.

This loads the package.

[Graphics:Images/index_gr_1.gif]

This loads and displays an example image.

[Graphics:Images/index_gr_2.gif]

[Graphics:Images/index_gr_3.gif]

This defines a commonly used generating kernel.

[Graphics:Images/index_gr_4.gif]
[Graphics:Images/index_gr_5.gif]

This constructs the Gaussian pyramid by repeatedly convolving an image with the generating kernel and decimating the result. A pure function is used to define the operation at each step of the iteration inside NestList.

[Graphics:Images/index_gr_6.gif]
[Graphics:Images/index_gr_7.gif]

As expected, the images have dimensions that decrease by a factor of four at each level of the pyramid.

[Graphics:Images/index_gr_8.gif]
[Graphics:Images/index_gr_9.gif]

This shows the images in a graphics array.

[Graphics:Images/index_gr_10.gif]

[Graphics:Images/index_gr_11.gif]

The differences of images at successive levels of the Gaussian pyramid define the Laplacian pyramid. To calculate a difference, the image at a higher level in the pyramid must be increased in size by a factor of four prior to subtraction. This computes the pyramid.

[Graphics:Images/index_gr_12.gif]
[Graphics:Images/index_gr_13.gif]

This shows the six levels of the Laplacian pyramid.

[Graphics:Images/index_gr_14.gif]

[Graphics:Images/index_gr_15.gif]

The original image may be reconstructed from the Laplacian pyramid by reversing the previous steps. This interpolates and adds the images at successive levels of the pyramid beginning with the lowest level.

[Graphics:Images/index_gr_16.gif]
[Graphics:Images/index_gr_17.gif]
[Graphics:Images/index_gr_18.gif]
[Graphics:Images/index_gr_19.gif]
[Graphics:Images/index_gr_20.gif]