MPSImageGaussianBlur(3)

NAME
MPSImageGaussianBlur -

SYNOPSIS

#import <MPSImageConvolution.h>

Inherits MPSUnaryImageKernel.

  Instance Methods
(nonnull instancetype) - initWithDevice:sigma:
(nonnull instancetype) - initWithDevice:

  Properties
float sigma

  Additional Inherited Members

Detailed Description

The MPSImageGaussianBlur convolves an image with gaussian of given sigma in both x and y direction.

            The MPSImageGaussianBlur utilizes a very fast algorith that typically runs at approximately
            1/2 of copy speeds. Notably, it is faster than either the tent or box blur except perhaps
            for very large filter windows. Mathematically, it is an approximate gaussian. Some
            non-gaussian behavior may be detectable with advanced analytical methods such as FFT.
            If a analytically clean gaussian filter is required, please use the MPSImageConvolution
            filter instead with an appropriate set of weights. The MPSImageGaussianBlur is intended
            to be suitable for all common image processing needs demanding ~10 bits of precision or
            less.

Method Documentation

  - (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) NS_DESIGNATED_INITIALIZER
Standard init with default properties per filter type

Parameters:
    device The device that the filter will be used on. May not be NULL.

Returns:
    a pointer to the newly initialized object. This will fail, returning nil if the device is not supported. Devices must be MTLFeatureSet_iOS_GPUFamily2_v1 or later.

Reimplemented from MPSKernel.

  - (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device(float) NS_DESIGNATED_INITIALIZER
Initialize a gaussian blur filter for a particular sigma and device

Parameters:
    device The device the filter will run on
    sigma The standard deviation of gaussian blur filter. Gaussian weight, centered at 0, at integer grid i is given as w(i) = 1/sqrt(2*pi*sigma) * exp(-i^2/2*sigma^2) If we take cut off at 1% of w(0) (max weight) beyond which weights are considered 0, we have ceil (sqrt(-log(0.01)*2)*sigma) ~ ceil(3.7*sigma) as rough estimate of filter width

Returns:
    A valid object or nil, if failure.

Property Documentation

  - sigma [read], [nonatomic], [assign]
Read-only sigma value with which filter was created

Author

Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.