I don't understand really well the principal component analysis. When I use Matlab, the function give me the principal components coefficient which I can easily multiply with my data. I am now trying to implement the same thing in c++ with OpenCV but the function return eigenvectors and eigenvalues.
What is the relation between eigenvectors / eigenvalues and principal components coefficient ?
Thank you
The principal components are determined by the eigenvectors of the covariance matrix of the data. In particular, if $w_1,\ldots,w_n$ are the eigenvectors of the covariance matrix of the data where the eigenvalue corresponding to $w_j$ is larger than $w_i$ if $j<i$, the corresponding principal components for some data vector $x$ will be $w_1^T x , w_2^T x, \ldots$. Normally, you'd keep the first few components and throw the rest away for dimensionality reduction.