getSubMatrix static method

Mat getSubMatrix(
  1. Mat matrix,
  2. Mat idx,
  3. int layout
)

Extracts from matrix the rows (ROW_SAMPLE) or columns (COL_SAMPLE) specified by idx.

Implementation

static Mat getSubMatrix(Mat matrix, Mat idx, int layout) {
  final rval = Mat.empty();
  cvRun(() => cml.cv_ml_TrainData_getSubMatrix(matrix.ref, idx.ref, layout, rval.ref));
  return rval;
}