InverseImagePyramid

InverseImagePyramid[pyr]

reconstructs an image from an ImagePyramid object pyr.

InverseImagePyramid[pyr,pyrtype]

assumes the specified pyramid type pyrtype.

InverseImagePyramid[pyr,pyrtype,n]

reconstructs up to pyramid level n.

InverseImagePyramid[pyr,pyrtype,{size}]

reconstructs up to the smallest pyramid level larger than the specified size.

Details

  • InverseImagePyramid computes the inverse of ImagePyramid.
  • Image pyramid is a multi-resolution representation of an image to facilitate efficient multi-scale processing. Typical applications include noise removal, image blending, texture synthesis and efficient rendering.
  • An image pyramid consists of several images with consecutively lower resolutions. Typically, specific levels of the pyramid are processed and the result is reconstructed using the inverse process.
  • InverseImagePyramid works with 2D and 3D image pyramids.
  • The pyramid type pyrtype can be any of the following:
  • "Lowpass" or "Gaussian"iteratively blurs and downsamples
    "Bandpass" or "Laplacian"difference pyramid by upsampling and subtracting the lower levels from the upper levels
    {"Lowpass",ker}use ker for downsampling
    {"Bandpass",ker1,ker2}use ker1 for downsampling and ker2 for upsampling
    pyruse specifications of a reference pyramid pyr
  • Use InverseImagePyramid[pyr,n] to reconstruct the pyramid using the type embedded in pyr.

Examples

open allclose all

Basic Examples  (2)

Reconstruct an image from a bandpass pyramid:

Reconstruct an image to a specific size:

Applications  (3)

Simulate decoding an image by incorporating more and more details:

Compute the Laplacian pyramid:

Display more details by reconstructing with higher and higher levels of the pyramid:

Denoise an image by attenuating the lowest level of the Laplacian pyramid:

Attenuate the noise in the lowest pyramid level by factor 0.1:

Reconstruct the image without the noise:

Extract the small-scale components in a volumetric dataset:

Create four levels of a Laplacian image pyramid with scaling factor :

Discard the top level of the pyramid that contains the large-scale components:

Reconstruct the original volume with only the small-scale components:

Properties & Relations  (2)

Compare the result of a reconstruction to the original image:

Compute the difference between the reconstructed image and the original:

The reconstructed image of a Gaussian pyramid is the same as the image of the bottom level:

Introduced in 2019
 (12.0)