http://www.emgu.com

Computes eigenvalues and eigenvectors of a symmetric matrix

**Namespace:** Emgu.CV**Assembly:** Emgu.CV (in Emgu.CV.dll) Version: 2.4.0.1717 (2.4.0.1717)

# Syntax

C# |
---|

public static void cvEigenVV( IntPtr mat, IntPtr evects, IntPtr evals, double eps, int lowindex, int highindex ) |

Visual Basic |
---|

Public Shared Sub cvEigenVV ( _ mat As IntPtr, _ evects As IntPtr, _ evals As IntPtr, _ eps As Double, _ lowindex As Integer, _ highindex As Integer _ ) |

Visual C++ |
---|

public: static void cvEigenVV( IntPtr mat, IntPtr evects, IntPtr evals, double eps, int lowindex, int highindex ) |

#### Parameters

- mat
- Type: System..::..IntPtr

The input symmetric square matrix, modified during the processing

- evects
- Type: System..::..IntPtr

The output matrix of eigenvectors, stored as subsequent rows

- evals
- Type: System..::..IntPtr

The output vector of eigenvalues, stored in the descending order (order of eigenvalues and eigenvectors is syncronized, of course)

- eps
- Type: System..::..Double

Accuracy of diagonalization. Typically, DBL EPSILON (about 10^(-15)) works well. THIS PARAMETER IS CURRENTLY IGNORED.

- lowindex
- Type: System..::..Int32

Optional index of largest eigenvalue/-vector to calculate. If either low- or highindex is supplied the other is required, too. Indexing is 1-based. Use 0 for default.

- highindex
- Type: System..::..Int32

Optional index of smallest eigenvalue/-vector to calculate. If either low- or highindex is supplied the other is required, too. Indexing is 1-based. Use 0 for default.

# Remarks

Currently the function is slower than cvSVD yet less accurate, so if A is known to be positivelydefined (for example, it is a covariance matrix)it is recommended to use cvSVD to find eigenvalues and eigenvectors of A, especially if eigenvectors are not required.

# Examples

To calculate the largest eigenvector/-value set lowindex = highindex = 1. For legacy reasons this function always returns a square matrix the same size as the source matrix with eigenvectors and a vector the length of the source matrix with eigenvalues. The selected eigenvectors/-values are always in the first highindex - lowindex + 1 rows.