skimage 0.17.2

ParametersReturns
pyramid_gaussian(image, max_layer=-1, downscale=2, sigma=None, order=1, mode='reflect', cval=0, multichannel=False, preserve_range=False)

Recursively applies the pyramid_reduce function to the image, and yields the downscaled images.

Note that the first image of the pyramid will be the original, unscaled image. The total number of images is :None:None:`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 : ndarray

Input image.

max_layer : int, optional

Number of layers for the pyramid. 0th layer is the original image. Default is -1 which builds all possible layers.

downscale : float, optional

Downscale factor.

sigma : float, optional

Sigma for Gaussian filter. Default is :None:None:`2 * downscale / 6.0` which corresponds to a filter mask twice the size of the scale factor that covers more than 99% of the Gaussian distribution.

order : int, optional

Order of splines used in interpolation of downsampling. See skimage.transform.warp for detail.

mode : {'reflect', 'constant', 'edge', 'symmetric', 'wrap'}, optional

The mode parameter determines how the array borders are handled, where cval is the value when mode is equal to 'constant'.

cval : float, optional

Value to fill past edges of input if mode is 'constant'.

multichannel : bool, optional

Whether the last axis of the image is to be interpreted as multiple channels or another spatial dimension.

preserve_range : bool, optional

Whether 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

Returns

pyramid : generator

Generator yielding pyramid layers as float images.

Yield images of the Gaussian pyramid formed by the input image.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /skimage/transform/pyramids.py#145
type: <class 'function'>
Commit: