compute static method

(Mat, Mat, Mat) compute(
  1. Mat src, {
  2. Mat? w,
  3. Mat? u,
  4. Mat? vt,
  5. int flags = 0,
})

decomposes matrix and stores the results to user-provided matrices The methods/functions perform SVD of matrix.

https://docs.opencv.org/4.1.2/df/df7/classcv_1_1SVD.html#a76f0b2044df458160292045a3d3714c6

Implementation

static (Mat w, Mat u, Mat vt) compute(Mat src, {Mat? w, Mat? u, Mat? vt, int flags = 0}) {
  w ??= Mat.empty();
  u ??= Mat.empty();
  vt ??= Mat.empty();
  cvRun(() => ccore.cv_SVD_Compute(src.ref, w!.ref, u!.ref, vt!.ref, flags, ffi.nullptr));
  return (w, u, vt);
}