Skip to content

copyTo

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

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

ARGUMENTSsrc, dst, mask
FUNCTIONcopyTo
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

This is an overloaded member function, provided for convenience (python) Copies the matrix to another one. When the operation mask is specified, if the Mat::create call shown above reallocates the matrix, the newly allocated matrix is initialized with all zeros before copying the data.

copyTo(src: Mat, dst: Mat, mask: Mat): void;
src

source matrix.

dst

Output destination, filled by the native operation. Destination matrix. If it does not have a proper size or type before the operation, it is reallocated.

mask

Operation mask of the same size as *this. Its non-zero elements indicate which matrix elements need to be copied. The mask has to be of type CV_8U, CV_8S or CV_Bool and can have 1 or multiple channels.

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.