ViewDatabase.h
Go to the documentation of this file.
00001 // *****************************************************************
00002 // Filename:  ViewDatabase.h
00003 // Copyright: Pedram Azad, Chair Prof. Dillmann (IAIM),
00004 //            Institute for Computer Science and Engineering (CSE),
00005 //            University of Karlsruhe. All rights reserved.
00006 // Author:        Pedram Azad
00007 // Date:      2005
00008 // *****************************************************************
00009 
00010 
00011 #ifndef _VIEW_DATABASE_H_
00012 #define _VIEW_DATABASE_H_
00013 
00014 
00015 // *****************************************************************
00016 // necessary includes
00017 // *****************************************************************
00018 
00019 #include <string>
00020 #include "DatabaseEntry.h"
00021 
00022 
00023 // *****************************************************************
00024 // forward class declarations
00025 // *****************************************************************
00026 
00027 class CFloatMatrix;
00028 class CByteImage;
00029 struct MyRegion;
00030 struct Transformation3d;
00031 struct Vec3d;
00032 
00033 
00034 
00035 // *****************************************************************
00036 // CViewDatabase
00037 // *****************************************************************
00038 
00039 class CViewDatabase
00040 {
00041 public:
00042         // constructor
00043         CViewDatabase();
00044         
00045         // destructor
00046         ~CViewDatabase();
00047         
00048         
00049         // public methods
00050         
00051         // for recognition
00052         bool Init(const char *pConfigurationFilename);
00053         bool InitRecognition();
00054         bool LearnTrainingData();
00055         int FindBestMatch(const CFloatMatrix *pInputData, float &error);
00056         bool GetView(int nGlobalIndex, int &nResultClass, int &nResultView);
00057         bool GetPose(int nClass, int nView, Transformation3d &poseData);
00058         
00059         // helpers
00060         static int GetNumberOfSamples(const char *pFileName, int &nInputDimension);
00061         static bool ReadData(const char *pFileName, float *pData, int nExpectedDimension);
00062         static void Normalize(const CByteImage *pInputImage, CByteImage *pOutputImage, const MyRegion &region);
00063         static void NormalizeIntensity(float *pData, int nLength);
00064         
00065         // member access
00066         int GetNumberOfClasses() { return m_nClasses; }
00067         int GetInputDimension() { return m_nInputDimension; }
00068         int GetTargetDimension() { return m_nTargetDimension; }
00069         int GetTotalNumberOfSamples() { return m_nTotalSamples; }
00070         const CDatabaseEntry* GetDatabaseEntry(int nIndex);
00071 
00072 
00073 
00074 private:
00075         // private methods
00076         void DeleteMatrices();
00077         void DeleteDatabase();
00078         bool ReadConfigurationFile(const char *pConfigurationFilename);
00079         bool WriteConfigurationFile(const char *pConfigurationFilename);
00080         
00081         
00082         // private attributes
00083         std::string m_sFullTransformationMatrixFilename;
00084         std::string m_sEigenvalueMatrixFilename;
00085         std::string m_sTransformationMatrixFilename;
00086         std::string m_sTrainingDataFilename;
00087         
00088         int m_nClasses;
00089         int m_nInputDimension;
00090         int m_nTargetDimension;
00091         int m_nTotalSamples;
00092         
00093         std::string m_sConfigurationFilename;
00094         
00095         CFloatMatrix *m_pTransformationMatrix;
00096         CFloatMatrix *m_pTrainedData;
00097         
00098         CDatabaseEntry **m_ppDatabaseEntries;
00099         
00100         bool m_bWriteConfigurationFile;
00101 };
00102 
00103 
00104 
00105 #endif /* _VIEW_DATABASE_H_ */


asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Thu Jun 6 2019 21:46:58