createResizer
Create a new Resizer with the given ResizerOptions (the equivalent of VisionCamera's createResizer).
The GPU pipeline is set up on a background thread. Check isResizerAvailable first to fall back to a CPU implementation on devices without GPU support.
val resizer = createResizer(
ResizerOptions(
width = 192,
height = 192,
channelOrder = ChannelOrder.RGB,
dataType = DataType.FLOAT32,
scaleMode = ScaleMode.COVER,
pixelLayout = PixelLayout.PLANAR,
),
)Content copied to clipboard
Throws
If the GPU pipeline could not be created, e.g. because it is not available on this device (isResizerAvailable).