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 ret = cvRunArena<bool>((arena) {
    final p = arena<ffi.Bool>();
    cvRun(() => cffi.Mat_Eigen(src.ref, eigenvalues!.ref, eigenvectors!.ref, p));
    return p.value;
  });
  return (ret, eigenvalues, eigenvectors);
}