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(() => cffi.Mat_FromRange(mat.ref, rowStart, rowEnd, colStart, colEnd!, p));
  return Mat._(p);
}