Eigenvectors and eigenvalues in OpenCV

There are many libraries for C++ that can be used to compute Eigenvectors and Eigenvalues. However, if you are already using OpenCV in your project, then it can be used to get these values easily by using the PCA class. This class is declared in opencv2/core/core.hpp header file and defined in the modules/core/src/matmul.cpp source file.

Here is an example:

Tried with: OpenCV 2.4.9 and Ubuntu 14.04

One thought on “Eigenvectors and eigenvalues in OpenCV

  1. I don’t want Eigen values to be in highest to lowest order because I want to know which concrete features are less significant, do you know how to find that? Thanks!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.