eigen function

(bool, Mat, Mat) eigen(
  1. InputArray src, {
  2. OutputArray? eigenvalues,
  3. OutputArray? eigenvectors,
})

Eigen calculates eigenvalues and eigenvectors of a symmetric matrix.

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

Implementation

(bool ret, Mat eigenvalues, Mat eigenvectors) eigen(
  InputArray src, {
  OutputArray? eigenvalues,
  OutputArray? eigenvectors,
}) {
  eigenvalues ??= Mat.empty();
  eigenvectors ??= Mat.empty();
  final p = calloc<ffi.Bool>();
  cvRun(() => ccore.cv_eigen(src.ref, eigenvalues!.ref, eigenvectors!.ref, p, ffi.nullptr));
  final ret = p.value;
  calloc.free(p);
  return (ret, eigenvalues, eigenvectors);
}