Adding read/write functions to PCA class. Update PCA test.

This commit is contained in:
Mathieu Barnachon
2013-08-05 12:06:55 +12:00
parent 4ed9b1ca9a
commit ff85575b28
3 changed files with 51 additions and 0 deletions

View File

@@ -670,6 +670,10 @@ public:
//! reconstructs the original vector from the projection
void backProject(InputArray vec, OutputArray result) const;
//! write and load PCA matrix
void write(FileStorage& fs ) const;
void read(const FileNode& fs);
Mat eigenvectors; //!< eigenvectors of the covariation matrix
Mat eigenvalues; //!< eigenvalues of the covariation matrix
Mat mean; //!< mean value subtracted before the projection and added after the back projection