|
|
|
@ -360,6 +360,19 @@ void cv::PCACompute(InputArray data, InputOutputArray mean, |
|
|
|
|
pca.eigenvectors.copyTo(eigenvectors); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void cv::PCACompute(InputArray data, InputOutputArray mean, |
|
|
|
|
OutputArray eigenvectors, OutputArray eigenvalues, |
|
|
|
|
int maxComponents) |
|
|
|
|
{ |
|
|
|
|
CV_INSTRUMENT_REGION() |
|
|
|
|
|
|
|
|
|
PCA pca; |
|
|
|
|
pca(data, mean, 0, maxComponents); |
|
|
|
|
pca.mean.copyTo(mean); |
|
|
|
|
pca.eigenvectors.copyTo(eigenvectors); |
|
|
|
|
pca.eigenvalues.copyTo(eigenvalues); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void cv::PCACompute(InputArray data, InputOutputArray mean, |
|
|
|
|
OutputArray eigenvectors, double retainedVariance) |
|
|
|
|
{ |
|
|
|
@ -371,6 +384,19 @@ void cv::PCACompute(InputArray data, InputOutputArray mean, |
|
|
|
|
pca.eigenvectors.copyTo(eigenvectors); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void cv::PCACompute(InputArray data, InputOutputArray mean, |
|
|
|
|
OutputArray eigenvectors, OutputArray eigenvalues, |
|
|
|
|
double retainedVariance) |
|
|
|
|
{ |
|
|
|
|
CV_INSTRUMENT_REGION() |
|
|
|
|
|
|
|
|
|
PCA pca; |
|
|
|
|
pca(data, mean, 0, retainedVariance); |
|
|
|
|
pca.mean.copyTo(mean); |
|
|
|
|
pca.eigenvectors.copyTo(eigenvectors); |
|
|
|
|
pca.eigenvalues.copyTo(eigenvalues); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void cv::PCAProject(InputArray data, InputArray mean, |
|
|
|
|
InputArray eigenvectors, OutputArray result) |
|
|
|
|
{ |
|
|
|
|