MPSImageThresholdToZero(3) | MetalPerformanceShaders.framework | MPSImageThresholdToZero(3) |
MPSImageThresholdToZero
#import <MPSImageThreshold.h>
Inherits MPSUnaryImageKernel.
(nonnull instancetype) -
initWithDevice:thresholdValue:linearGrayColorTransform:
(nonnull instancetype) - initWithDevice:
(nullable instancetype) - initWithCoder:device:
float thresholdValue
const float * transform
The MPSImageThresholdToZero filter applies a fixed-level threshold to each pixel in the image. The threshold functions convert a single channel image to a binary image. If the input image is not a single channel image, convert the inputimage to a single channel luminance image using the linearGrayColorTransform and then apply the threshold. The ThresholdToZero function is: destinationPixelValue = sourcePixelValue > thresholdValue ? sourcePixelValue : 0
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:
Returns:
Reimplemented from MPSUnaryImageKernel.
Standard init with default properties per filter type
Parameters:
Returns:
Reimplemented from MPSUnaryImageKernel.
initialize a MPSImageThresholdToZero filter
Parameters:
The threshold value used to init the threshold filter
The color transform used to init the threshold filter
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.
Mon Jul 9 2018 | Version MetalPerformanceShaders-119.3 |