compute static method
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);
}