bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / transform / pyramids / pyramid_laplacian
function
skimage.transform.pyramids:pyramid_laplacian
source: /dev/scikit-image/src/skimage/transform/pyramids.py:292
Signature
def pyramid_laplacian(image, max_layer = -1, downscale = 2, sigma = None, order = 1, mode = reflect, cval = 0, preserve_range = False, *, channel_axis = None)Summary
Yield images of the laplacian pyramid formed by the input image.
Extended Summary
Each layer contains the difference between the downsampled and the downsampled, smoothed image
layer = resize(prev_layer) - smooth(resize(prev_layer))Note that the first image of the pyramid will be the difference between the original, unscaled image and its smoothed version. The total number of images is max_layer + 1. In case all layers are computed, the last image is either a one-pixel image or the image where the reduction does not change its shape.
Parameters
image: ndarrayInput image.
max_layer: int, optionalNumber of layers for the pyramid. 0th layer is the original image. Default is -1 which builds all possible layers.
downscale: float, optionalDownscale factor.
sigma: float, optionalSigma for Gaussian filter. Default is
2 * downscale / 6.0which corresponds to a filter mask twice the size of the scale factor that covers more than 99% of the Gaussian distribution.order: int, optionalOrder of splines used in interpolation of downsampling. See skimage.transform.warp for detail.
mode: {'reflect', 'constant', 'edge', 'symmetric', 'wrap'}, optionalThe mode parameter determines how the array borders are handled, where cval is the value when mode is equal to 'constant'.
cval: float, optionalValue to fill past edges of input if mode is 'constant'.
preserve_range: bool, optionalWhether to keep the original range of values. Otherwise, the input image is converted according to the conventions of img_as_float. Also see https://scikit-image.org/docs/dev/user_guide/data_types.html
channel_axis: int or None, optionalIf None, the image is assumed to be a grayscale (single channel) image. Otherwise, this parameter indicates which axis of the array corresponds to channels.
Returns
pyramid: generatorGenerator yielding pyramid layers as float images.
Aliases
skimage.transform.pyramid_laplacian