Skip to main content

TensorMath.findContours

Function

Returns contours.

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

findContours(inTensor, inShape, mode, method, offset, outTensor): number[]

Returns contours. Note that: contours are sorted from the largest to the smallest; 2) We cannot return Array of TypedArray-s, so all contours data is stored in single outTensor and Array with sizes of each contour is returned.

Parameters

ParameterType
inTensorUint8Array
inShapevec3
modenumber
methodnumber
offsetvec2
outTensorInt32Array

Returns

number[]