MPSImageFindKeypoints(3) MetalPerformanceShaders.framework MPSImageFindKeypoints(3)
NAME
MPSImageFindKeypoints
SYNOPSIS
#import <MPSImageKeypoint.h>
Inherits MPSKernel.
Instance Methods
(nonnull instancetype) - initWithDevice:info:
(nonnull instancetype) - initWithDevice:
(nullable instancetype) - initWithCoder:device:
(void) -
encodeToCommandBuffer:sourceTexture:regions:numberOfRegions:keypointCountBuffer:keypointCountBufferOffset:keypointDataBuffer:keypointDataBufferOffset:
Properties
MPSImageKeypointRangeInfo keypointRangeInfo
Additional Inherited Members
Detailed Description
The MPSImageFindKeypoints kernel is used to find a list of keypoints whose values are >= minimumPixelThresholdValue in
MPSImageKeypointRangeInfo. The keypoints are generated for a specified region in the image.
The pixel format of the source image must be MTLPixelFormatR8Unorm.
Method Documentation
- (void) encodeToCommandBuffer: (nonnull id< MTLCommandBuffer >) commandBuffer(nonnull id< MTLTexture >) source(const MTLRegion *__nonnull)
regions(NSUInteger) numberOfRegions(nonnull id< MTLBuffer >) keypointCountBuffer(NSUInteger) keypointCountBufferOffset(nonnull id<
MTLBuffer >) keypointDataBuffer(NSUInteger) keypointDataBufferOffset
Encode the filter to a command buffer using a MTLComputeCommandEncoder. The filter will not begin to execute until after the command
buffer has been enqueued and committed.
Parameters:
commandBuffer A valid MTLCommandBuffer.
source A valid MTLTexture containing the source image for the filter.
regions An array of rectangles that describe regions in the image. The list of keypoints is generated for each individual rectangle
specifed.
keypointCountBuffer The list of keypoints for each specified region
keypointCountBufferOffset Byte offset into keypointCountBufferOffset buffer at which to write the keypoint results. Must be a multiple
of 32 bytes.
keypointDataBuffer A valid MTLBuffer to receive the keypoint data results for each rectangle. The keypoint data for keypoints in each
rectangle are stored consecutively. The keypoint data for each rectangle starts at the following offset:
MPSImageKeypointRangeInfo.maximumKeyPoints * rectangle index
keypointDataBufferOffset Byte offset into keypointData buffer at which to write the keypoint results. Must be a multiple of 32 bytes.
- (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 MPSKernel.
- (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 MPSKernel.
- (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device(const MPSImageKeypointRangeInfo *__nonnull) info
Specifies information to find keypoints in an image.
Parameters:
device The device the filter will run on
info Pointer to the MPSImageKeypointRangeInfo struct
Returns:
A valid MPSImageFindKeypoints object or nil, if failure.
Property Documentation
- keypointRangeInfo [read], [nonatomic], [assign]
Return a structure describing the keypoint range info Returns a MPSImageKeypointRangeInfo structure
Author
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.
Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSImageFindKeypoints(3)