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

csuCommonSubspace.h

Go to the documentation of this file.
00001 /*
00002  *  csuCommonSubspace.h
00003  *
00004  *  Created by Marcio L. Teixeira on Tue Jun 19 2002.
00005  *  Copyright (c) 2002 __MyCompanyName__. All rights reserved.
00006  *
00007  */
00008 
00009 #ifndef CSU_COMMON_SUBSPACE_INCLUDED
00010 #define CSU_COMMON_SUBSPACE_INCLUDED
00011 
00012 #include "csuCommon.h"
00013 namespace csu{
00014 typedef struct
00015 {
00016   int numPixels;
00017   int basisDim;
00018 
00019   Matrix values;
00020   Matrix basis;
00021   Matrix mean;
00022 
00023   /* Try to use nomenclature compatible with [1] */
00024 
00025   int constM;
00026   int constN;
00027   int constNt;
00028 } Subspace;
00029 
00030 
00031   Matrix projectImages(Matrix images, Matrix basis, Matrix mean);
00032   
00033 void readTrainingFile(const char* trainingFile, int *numPixels, int *basisDim, Matrix *mean, Matrix *values,
00034                       Matrix *basis, int *ldaSpace, int quiet);
00035 
00036 void validateBasisIsOrthonormal(Matrix basis, int printlevel);
00037 
00038 Matrix centerThenProjectImages(Subspace *s, Matrix images);
00039 
00040 void readSubspace (Subspace *s, const char *trainingFile, int quiet);
00041 Matrix readAndProjectImages(Subspace *s, char *imageNamesFile, char *imageDirectory, int *numImages, ImageList **srt);
00042 
00043 /* The following are prototypes for functions found in the csuSubspace files. */
00044 
00045 /* eigensolvers found in csuSubspaceCVEigen */
00046 int  cvJacobiEigens_32f ( float* A, float* V, float* E, int n, float eps );
00047 int  cvJacobiEigens_64d( double* A, double* V, double* E, int n, double eps );
00048 
00049 /* basis manipulation */
00050 void basis_normalize(Matrix eigenvectors);
00051 void mean_subtract_images(Matrix images, Matrix mean);
00052 Matrix get_mean_image(Matrix images);
00053 
00054 /* subspace training functions */
00055 void eigentrain(Matrix *mean, Matrix *eigen_vals, Matrix *eigen_base, Matrix images);
00056 void fisherTrain(Matrix imspca, ImageList *srt, Matrix *fisherBasis, Matrix *fisherValues, int writeTextInterm);
00057 }
00058 #endif /* CSU_COMMON_SUBSPACE_INCLUDED */
00059 

Generated on Wed Apr 23 10:42:33 2003 for BioFilter by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002