Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mpsimagetent(3) [mojave man page]

MPSImageTent(3) 					 MetalPerformanceShaders.framework					   MPSImageTent(3)

NAME
MPSImageTent SYNOPSIS
#import <MPSImageConvolution.h> Inherits MPSImageBox. Additional Inherited Members Detailed Description The box filter, while fast, may yield square-ish looking blur effects. However, multiple passes of the box filter tend to smooth out with each additional pass. For example, two 3-wide box blurs produces the same effective convolution as a 5-wide tent blur: 1 1 1 1 1 1 + 1 1 1 ================= 1 2 3 2 1 Addition passes tend to approximate a gaussian line shape. The MPSImageTent convolves an image with a tent filter. These form a tent shape with incrementally increasing sides, for example: 1 2 3 2 1 1 2 1 2 4 2 1 2 1 Like the box filter, this arrangement allows for much faster algorithms, espcially for for larger blur radii but with a more pleasing appearance. The tent blur is a separable filter. The implementation is aware of this and will act accordingly to give best performance for multi- dimensional blurs. Author Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSImageTent(3)

Check Out this Related Man Page

MPSImageGaussianBlur(3) 				 MetalPerformanceShaders.framework				   MPSImageGaussianBlur(3)

NAME
MPSImageGaussianBlur SYNOPSIS
#import <MPSImageConvolution.h> Inherits MPSUnaryImageKernel. Instance Methods (nonnull instancetype) - initWithDevice:sigma: (nullable instancetype) - initWithCoder:device: (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 - (nullable instancetype) initWithCoder: (NSCoder *__nonnull) aDecoder(nonnull id< MTLDevice >) device NSSecureCoding compatability While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead. Parameters: aDecoder The NSCoder subclass with your serialized MPSKernel device The MTLDevice on which to make the MPSKernel Returns: A new MPSKernel object, or nil if failure. Reimplemented from MPSUnaryImageKernel. - (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device 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 MPSUnaryImageKernel. - (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device(float) sigma 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. Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSImageGaussianBlur(3)
Man Page