Mat.fromPtr constructor

Mat.fromPtr(
  1. Mat m,
  2. int rows,
  3. int cols,
  4. int type,
  5. int prows,
  6. int pcols,
)

this constructor is a wrapper of Mat (int rows, int cols, int type, void *data, size_t step=AUTO_STEP)

https://docs.opencv.org/4.x/d3/d63/classcv_1_1Mat.html#a51615ebf17a64c968df0bf49b4de6a3a

Implementation

factory Mat.fromPtr(
  ccore.Mat m,
  int rows,
  int cols,
  int type,
  int prows,
  int pcols,
) {
  final p = calloc<ccore.Mat>();
  cvRun(() => ccore.Mat_FromPtr(m, rows, cols, type, prows, pcols, p));
  final mat = Mat._(p);
  return mat;
}