skimage2.transform.pyramid_reduce#
- skimage2.transform.pyramid_reduce(image, downscale=2, sigma=None, order=1, mode='reflect', cval=0, preserve_range=False, *, channel_axis=None)[source]#
Smooth and then downsample image.
- Parameters:
- imagendarray
Input image.
- downscalefloat, optional
Downscale factor.
- sigmafloat, optional
Sigma 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.- orderint, optional
Order of splines used in interpolation of downsampling. See
skimage.transform.warpfor 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’.
- cvalfloat, optional
Value to fill past edges of input if mode is ‘constant’.
- preserve_rangebool, 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- channel_axisint or None, optional
If None, the image is assumed to be a grayscale (single channel) image. Otherwise, this parameter indicates which axis of the array corresponds to channels.
Added in version 0.19:
channel_axiswas added in 0.19.
- Returns:
- outarray
Smoothed and downsampled float image.
References