invert function

(double, Mat) invert(
  1. InputArray src, {
  2. OutputArray? dst,
  3. int flags = DECOMP_LU,
})

Invert finds the inverse or pseudo-inverse of a matrix.

For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#gad278044679d4ecf20f7622cc151aaaa2

Implementation

(double rval, Mat dst) invert(
  InputArray src, {
  OutputArray? dst,
  int flags = DECOMP_LU,
}) {
  dst ??= Mat.empty();
  final rval = cvRunArena<double>((arena) {
    final p = arena<ffi.Double>();
    cvRun(() => ccore.Mat_Invert(src.ref, dst!.ref, flags, p));
    return p.value;
  });
  return (rval, dst);
}