ViewDatabase.h
Go to the documentation of this file.
1 // *****************************************************************
2 // Filename: ViewDatabase.h
3 // Copyright: Pedram Azad, Chair Prof. Dillmann (IAIM),
4 // Institute for Computer Science and Engineering (CSE),
5 // University of Karlsruhe. All rights reserved.
6 // Author: Pedram Azad
7 // Date: 2005
8 // *****************************************************************
9 
10 
11 #ifndef _VIEW_DATABASE_H_
12 #define _VIEW_DATABASE_H_
13 
14 
15 // *****************************************************************
16 // necessary includes
17 // *****************************************************************
18 
19 #include <string>
20 #include "DatabaseEntry.h"
21 
22 
23 // *****************************************************************
24 // forward class declarations
25 // *****************************************************************
26 
27 class CFloatMatrix;
28 class CByteImage;
29 struct MyRegion;
30 struct Transformation3d;
31 struct Vec3d;
32 
33 
34 
35 // *****************************************************************
36 // CViewDatabase
37 // *****************************************************************
38 
40 {
41 public:
42  // constructor
43  CViewDatabase();
44 
45  // destructor
47 
48 
49  // public methods
50 
51  // for recognition
52  bool Init(const char *pConfigurationFilename);
53  bool InitRecognition();
54  bool LearnTrainingData();
55  int FindBestMatch(const CFloatMatrix *pInputData, float &error);
56  bool GetView(int nGlobalIndex, int &nResultClass, int &nResultView);
57  bool GetPose(int nClass, int nView, Transformation3d &poseData);
58 
59  // helpers
60  static int GetNumberOfSamples(const char *pFileName, int &nInputDimension);
61  static bool ReadData(const char *pFileName, float *pData, int nExpectedDimension);
62  static void Normalize(const CByteImage *pInputImage, CByteImage *pOutputImage, const MyRegion &region);
63  static void NormalizeIntensity(float *pData, int nLength);
64 
65  // member access
66  int GetNumberOfClasses() { return m_nClasses; }
70  const CDatabaseEntry* GetDatabaseEntry(int nIndex);
71 
72 
73 
74 private:
75  // private methods
76  void DeleteMatrices();
77  void DeleteDatabase();
78  bool ReadConfigurationFile(const char *pConfigurationFilename);
79  bool WriteConfigurationFile(const char *pConfigurationFilename);
80 
81 
82  // private attributes
87 
92 
94 
97 
99 
101 };
102 
103 
104 
105 #endif /* _VIEW_DATABASE_H_ */
void DeleteMatrices()
int m_nTargetDimension
Definition: ViewDatabase.h:90
std::string m_sTransformationMatrixFilename
Definition: ViewDatabase.h:85
int m_nInputDimension
Definition: ViewDatabase.h:89
static void Normalize(const CByteImage *pInputImage, CByteImage *pOutputImage, const MyRegion &region)
CFloatMatrix * m_pTrainedData
Definition: ViewDatabase.h:96
const CDatabaseEntry * GetDatabaseEntry(int nIndex)
static int GetNumberOfSamples(const char *pFileName, int &nInputDimension)
bool GetPose(int nClass, int nView, Transformation3d &poseData)
Data structure for the representation of a 3D vector.
Definition: Math3d.h:73
Data structure for the representation of 8-bit grayscale images and 24-bit RGB (or HSV) color images ...
Definition: ByteImage.h:80
CFloatMatrix * m_pTransformationMatrix
Definition: ViewDatabase.h:95
bool ReadConfigurationFile(const char *pConfigurationFilename)
CDatabaseEntry ** m_ppDatabaseEntries
Definition: ViewDatabase.h:98
bool LearnTrainingData()
int GetTotalNumberOfSamples()
Definition: ViewDatabase.h:69
Data structure for the representation of a matrix of values of the data type float.
Definition: FloatMatrix.h:56
void DeleteDatabase()
std::string m_sFullTransformationMatrixFilename
Definition: ViewDatabase.h:83
int GetInputDimension()
Definition: ViewDatabase.h:67
static bool ReadData(const char *pFileName, float *pData, int nExpectedDimension)
GLsizei const GLchar ** string
Definition: glext.h:3528
std::string m_sConfigurationFilename
Definition: ViewDatabase.h:93
std::string m_sEigenvalueMatrixFilename
Definition: ViewDatabase.h:84
bool GetView(int nGlobalIndex, int &nResultClass, int &nResultView)
static void NormalizeIntensity(float *pData, int nLength)
int FindBestMatch(const CFloatMatrix *pInputData, float &error)
std::string m_sTrainingDataFilename
Definition: ViewDatabase.h:86
bool WriteConfigurationFile(const char *pConfigurationFilename)
int GetTargetDimension()
Definition: ViewDatabase.h:68
bool m_bWriteConfigurationFile
Definition: ViewDatabase.h:100
int GetNumberOfClasses()
Definition: ViewDatabase.h:66
bool InitRecognition()
bool Init(const char *pConfigurationFilename)
Data structure for the representation of a 3D rigid body transformation.
Definition: Math3d.h:105


asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Mon Dec 2 2019 03:47:28