Home | History | Annotate | Download | only in cpp

Lines Matching refs:pca

2 * pca.cpp
10 * This program demonstrates how to use OpenCV PCA with a
16 * begin the full path to an image. PCA will be performed
95 PCA pca;
102 cout << "re-calculating PCA..." << std::flush;
108 p->pca = PCA(p->data, cv::Mat(), PCA::DATA_AS_ROW, var);
110 Mat point = p->pca.project(p->data.row(0));
111 Mat reconstruction = p->pca.backProject(point);
116 cout << "done! # of principal components: " << p->pca.eigenvectors.rows << endl;
152 // perform PCA
153 PCA pca(data, cv::Mat(), PCA::DATA_AS_ROW, 0.95); // trackbar is initially set here, also this is a common value for retainedVariance
156 Mat point = pca.project(data.row(0)); // project into the eigenspace, thus the image becomes a "point"
157 Mat reconstruction = pca.backProject(point); // re-create the image from the "point"
170 p.pca = pca;