Skip to content

reshapeWithShape

Core and matricesfunctionOpenCV 5.0.0
import { reshapeWithShape } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTS_0, _1, _2
FUNCTIONreshapeWithShape
RETURN TYPEMat
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Create an owned matrix header with new channel count and tensor dimensions without copying pixels. The total element count must stay unchanged and native continuity rules apply.

reshapeWithShape(_0: Mat, _1: number, _2: IntVector): Mat;
_0

0 argument (Mat).

_1

1 argument (number).

_2

2 argument (IntVector).

Returns

The Mat result. Release returned native handles with using or delete(), including handles nested in results.

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.