MPSImageThresholdBinary(3) | MetalPerformanceShaders.framework | MPSImageThresholdBinary(3) |
MPSImageThresholdBinary
#import <MPSImageThreshold.h>
Inherits MPSUnaryImageKernel.
(nonnull instancetype) -
initWithDevice:thresholdValue:maximumValue:linearGrayColorTransform:
(nullable instancetype) - initWithCoder:device:
(nonnull instancetype) - initWithDevice:
float thresholdValue
float maximumValue
const float * transform
MPSImageThreshold.h MetalPerformanceShaders
Copyright:
The MPSThreshold 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 ThresholdBinary function is: destinationPixelValue = sourcePixelValue > thresholdValue ? maximumValue : 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 MPSImageThresholdBinary filter
Parameters:
The maximum value used to init the threshold filter
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 |