TensorMath.textureToGrayscale
FunctionConverts the texture to a set of 0-255 grayscale values, and outputs the result into outTensor.
- Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.
textureToGrayscale(
texture,grayscaleBuffer,grayscaleBufferShape):void
Converts the texture to a set of 0-255 grayscale values, and outputs the result into outTensor.
outTensor should be a Uint8Array of shape {width, height, 1}.
Parameters
Returns
void