Skip to content

gapi_crop

gapifunctionOpenCV 5.0.0
import { gapi_crop } from '@banou/opencv-wasm'

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

ARGUMENTSsrc, rect
FUNCTIONgapi_crop
RETURN TYPEGMat
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Crops a 2D matrix.

The function crops the matrix by given cv::Rect.

Output matrix must be of the same depth as input one, size is specified by given rect size.

Note: Function textual ID is "org.opencv.core.transform.crop"

See: resize

gapi_crop(src: GMat, rect: Rect): GMat;
src

input matrix.

rect

a rect to crop a matrix to

Returns

The GMat 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.