MPSImageBox(3)

NAME
MPSImageBox -

SYNOPSIS

#import <MPSImageConvolution.h>

Inherits MPSUnaryImageKernel.

Inherited by MPSImageTent.

  Instance Methods
(nonnull instancetype) - initWithDevice:kernelWidth:kernelHeight:
(nonnull instancetype) - initWithDevice:

  Properties
NSUInteger kernelHeight
NSUInteger kernelWidth

  Additional Inherited Members

Detailed Description

The MPSImageBox convolves an image with given filter of odd width and height. The kernel elements all have equal weight, achieving a blur effect. (Each result is the unweighted average of the surrounding pixels.) This allows for much faster algorithms, espcially for larger blur radii. The box height and width must be odd numbers. The box blur is a separable filter. The implementation is aware of this and will act accordingly to give best performance for multi-dimensional blurs.

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(NSUInteger) kernelWidth(NSUInteger) NS_DESIGNATED_INITIALIZER
Initialize a filter for a particular kernel size and device

Parameters:
    device The device the filter will run on
    kernelWidth the width of the kernel. Must be an odd number.
    kernelHeight the height of the kernel. Must be an odd number.

Returns:
    A valid object or nil, if failure.

Property Documentation

  - kernelHeight [read], [nonatomic], [assign]
The height of the filter window.

  - kernelWidth [read], [nonatomic], [assign]
The width of the filter window.

Author

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