eigen

Function eigen 

Source
pub fn eigen(
    src: &impl ToInputArray,
    eigenvalues: &mut impl ToOutputArray,
    eigenvectors: &mut impl ToOutputArray,
) -> Result<bool>
Expand description

Calculates eigenvalues and eigenvectors of a symmetric matrix.

The function cv::eigen calculates just eigenvalues, or eigenvalues and eigenvectors of the symmetric matrix src:

   src*eigenvectors.row(i).t() = eigenvalues.at<srcType>(i)*eigenvectors.row(i).t()

Note: Use cv::eigenNonSymmetric for calculation of real eigenvalues and eigenvectors of non-symmetric matrix.

§Parameters

  • src: input matrix that must have CV_32FC1 or CV_64FC1 type, square size and be symmetrical (src ^T^ == src).
  • eigenvalues: output vector of eigenvalues of the same type as src; the eigenvalues are stored in the descending order.
  • eigenvectors: output matrix of eigenvectors; it has the same size and type as src; the eigenvectors are stored as subsequent matrix rows, in the same order as the corresponding eigenvalues.

§See also

eigenNonSymmetric, completeSymm, PCA

§C++ default parameters

  • eigenvectors: noArray()