MPSNNCropAndResizeBilinear(3) MetalPerformanceShaders.framework MPSNNCropAndResizeBilinear(3)

MPSNNCropAndResizeBilinear

#import <MPSNNResize.h>

Inherits MPSCNNKernel.


(nonnull instancetype) - initWithDevice:
(nonnull instancetype) - initWithDevice:resizeWidth:resizeHeight:numberOfRegions:regions:
(nullable instancetype) - initWithCoder:device:


NSUInteger resizeWidth
NSUInteger resizeHeight
NSUInteger numberOfRegions
const MPSRegion * regions

This depends on Metal.framework The MPSNNCropAndResizeBilinear filter resizes the source image using bilinear interpolation to a destination whose dimensions are given by resizeWidth and resizeHeight

The number of output feature channels remains the same as the number of input feature channels.

- (nullable instancetype) initWithCoder: (NSCoder *__nonnull) aDecoder(nonnull id< MTLDevice >) device

NSSecureCoding compatability See MPSKernel::initWithCoder.

Parameters:

aDecoder The NSCoder subclass with your serialized MPSNNCropAndResizeBilinear
device The MTLDevice on which to make the MPSNNCropAndResizeBilinear

Returns:

A new MPSNNResizeBilinear object, or nil if failure.

Reimplemented from MPSCNNKernel.

- (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 MPSCNNKernel.

- (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device(NSUInteger) resizeWidth(NSUInteger) resizeHeight(NSUInteger) numberOfRegions(const MPSRegion *__nonnull) regions

Initialize the crop and resize bilinear filter.

Parameters:

device The device the filter will run on.
resizeWidth The destination resize width in pixels
resizeHeight The destination resize height in pixels
numberOfRegions Specifies the number of bounding box i.e. regions to resize
regions This is a pointer to 'numberOfRegions' boxes which specify the locations in the source image to use for each box/region to perform the resize operation.

Returns:

A valid MPSNNCropAndResizeBilinear object or nil, if failure.

- numberOfRegions [read], [nonatomic], [assign]

the number of bounding box i.e. regions to resize.

- regions [read], [nonatomic], [assign]

This is a pointer to 'numberOfRegions' boxes which specify the locations in the source image to use for each box/region to perform the resize operation. The coordinates specified are normalized values. A normalized region outside the [0, 1] range is allowed, in which case we use extrapolation_value to extrapolate the input image values.

- resizeHeight [read], [nonatomic], [assign]

The resize height.

- resizeWidth [read], [nonatomic], [assign]

The resize width.

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

Mon Jul 9 2018 Version MetalPerformanceShaders-119.3