Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

RGB_PcaOp.hpp

00001 #ifndef _RGB_PcaOp_H
00002 #define _RGB_PcaOp_H
00003 
00036 #include <stdio.h>
00037 
00038 #include "AnImage.hpp"
00039 
00040 #include "RImage.hpp"           
00041 #include "Real3CImage.hpp"
00042 
00043 class RGB_PcaOp
00044 {
00045 private:
00046 
00047 int                             width, height;
00048 
00049 double*                 meanChannel;
00050 double*                 covariance;
00051 
00052 
00053 double*                 eigenValue;
00054 double*                 triDiagonalCov;
00055 double*                 eigenVectors;
00056 
00057 double*                 e;                              // temporary eigenvalue computation
00058 
00059 protected:
00060 
00061 void computePixelCovariance(AnImage* g);
00062 
00063 void triDiagonalisation();
00064 
00065 // Public householder tridiagonalisation in C
00066 void tri_diag(double* a,double* d,double* e,double* z,int n,double tol);
00067 int calc_eigenstructure(double* d,double* e,double* z,int n,double macheps);
00068 
00069 public:
00070 
00071 RGB_PcaOp();
00072 virtual ~RGB_PcaOp();
00073 
00074 // Default is principal component
00075 virtual RImage* singleFilter(AnImage* source, RImage* destination, int pcaChannel=0);
00076 // All channels recovered
00077 virtual Real3CImage* filter(AnImage* source, Real3CImage* destination);
00078 
00079 virtual void report(FILE* file){}
00080 virtual void report(){}
00081 };
00082 
00083 #endif
SourceForge.net Logo
Restoreinpaint sourceforge project `C++/Java Image Processing, Restoration, Inpainting Project'.

Bernard De Cuyper: Open Project Leader: Concept, design and development.
Bernard De Cuyper & Eddy Fraiha 2002, 2003. Bernard De Cuyper 2004. Open and free, for friendly usage only.
Modifications on Belgium ground of this piece of artistic work, by governement institutions or companies, must be notified to Bernard De Cuyper.
bern_bdc@hotmail.com