Mat.fromRange constructor

Mat.fromRange(
  1. Mat mat,
  2. int rowStart,
  3. int rowEnd, {
  4. int colStart = 0,
  5. int? colEnd,
})

Create Mat from another Mat with range

Returns a reference of Mat

Implementation

factory Mat.fromRange(Mat mat, int rowStart, int rowEnd, {int colStart = 0, int? colEnd}) {
  final p = calloc<cvg.Mat>();
  colEnd ??= mat.cols;
  cvRun(() => ccore.cv_Mat_create_12(mat.ref, rowStart, rowEnd, colStart, colEnd!, p, ffi.nullptr));
  return Mat._(p);
}