#include <RGB_PcaOp.hpp>
Purpose: PCA on covariance matrix of color RGB pixels allows to compute a fast separation of PCA components. Computation of the covariance is reduced, because we are not dealing with large number of channels. Also, we have the advantage, that the ordered PCAs can be evaluated quickly. The strongest PCA holds the most information. Papers: "Principal Component Neural Networks: Theory and Applications", K.I.Diamantaras, S.Y.Kung, Wiley-Interscience Publication, 1996. "Decision Estimation and Classification: An Introduction to Pattern Recognition and Related Topics.", Charles W. Therrien, John Wiley & Sons 1989. Additional source: A very good public routine to tri-diagonalize a real symmetric matrix uses Householder's method. Thanks to Jeffrey D. Taft: "The C Eigenvector Source Code Page".
Public Methods | |
RGB_PcaOp () | |
virtual | ~RGB_PcaOp () |
virtual RImage * | singleFilter (AnImage *source, RImage *destination, int pcaChannel=0) |
virtual Real3CImage * | filter (AnImage *source, Real3CImage *destination) |
virtual void | report (FILE *file) |
virtual void | report () |
Protected Methods | |
void | computePixelCovariance (AnImage *g) |
void | triDiagonalisation () |
void | tri_diag (double *a, double *d, double *e, double *z, int n, double tol) |
int | calc_eigenstructure (double *d, double *e, double *z, int n, double macheps) |
Private Attributes | |
int | width |
int | height |
double * | meanChannel |
double * | covariance |
double * | eigenValue |
double * | triDiagonalCov |
double * | eigenVectors |
double * | e |