MPSImageThresholdTruncate(3)

NAME
MPSImageThresholdTruncate -

SYNOPSIS

#import <MPSImageThreshold.h>

Inherits MPSUnaryImageKernel.

  Instance Methods
(nonnull instancetype) - initWithDevice:thresholdValue:linearGrayColorTransform:
(nonnull instancetype) - initWithDevice:

  Properties
float thresholdValue
const float * transform

  Additional Inherited Members

Detailed Description

The MPSImageThresholdTruncate 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 ThresholdTruncate function is: destinationPixelValue = sourcePixelValue > thresholdValue ? thresholdValue : sourcePixelValue

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) thresholdValue(const float *__nullable) NS_DESIGNATED_INITIALIZER
initialize a MPSImageThresholdTruncate filter

Parameters:
    device The device the filter will run on
    thresholdValue The threshold value to use
    transform This matrix is an array of 3 floats. The default if no transform is specifed is BT.601/JPEG: {0.299f, 0.587f, 0.114f};

Property Documentation

  - thresholdValue [read], [nonatomic], [assign]
The threshold value used to init the threshold filter

  - transform [read], [nonatomic], [assign]
The color transform used to init the threshold filter

Author

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