ml_TrainData_getSubMatrix
import { ml_TrainData_getSubMatrix } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
ARGUMENTSmatrix, idx, layout
FUNCTIONml_TrainData_getSubMatrix
RETURN TYPEMat
Extract from matrix rows/cols specified by passed indexes.
ml_TrainData_getSubMatrix(matrix: Mat, idx: Mat, layout: number): Mat;matrixinput matrix (supported types: CV_32S, CV_32F, CV_64F)
idx1D index vector
layoutspecifies to extract rows (cv::ml::ROW_SAMPLES) or to extract columns (cv::ml::COL_SAMPLES)
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.