ViewDatabase2.h
Go to the documentation of this file.
1 // *****************************************************************
2 // Filename: ViewDatabase2.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: 04.12.2007
8 // *****************************************************************
9 
10 
11 #ifndef _VIEW_DATABASE2_H_
12 #define _VIEW_DATABASE2_H_
13 
14 
15 // *****************************************************************
16 // necessary includes
17 // *****************************************************************
18 
19 #include <string>
20 #include "DatabaseEntry.h"
22 
23 
24 // *****************************************************************
25 // forward class declarations
26 // *****************************************************************
27 
28 class CFloatMatrix;
29 class CByteImage;
30 struct MyRegion;
31 struct Vec3d;
32 
33 
34 
35 // *****************************************************************
36 // CViewDatabase2
37 // *****************************************************************
38 
40 {
41 public:
42  // constructor
44 
45  // destructor
47 
48 
49  // public methods
50 
51  // for recognition
52  bool Init(const char *pBasePath, const char* pPathPrefix = 0, std::string overrideClassName = "");
53  bool InitRecognition();
54  bool LearnTrainingData();
55  int FindBestMatch(const CFloatMatrix *pInputData, float &error) const;
56  bool GetView(int nGlobalIndex, int &nResultClass, int &nResultView);
57  bool GetPose(int nView, Transformation3d &pose);
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
68  int GetNumberOfSamples() { return m_nSamples; }
70 
71 
72 
73 private:
74  // private methods
75  void DeleteMatrices();
76  bool ReadConfigurationFile(const char *pBasePath);
77  bool WriteConfigurationFile(const char *pConfigurationFilename);
78 
79 
80  // private attributes
85 
89 
91 
94 
96 };
97 
98 
99 
100 #endif /* _VIEW_DATABASE2_H_ */
bool InitRecognition()
int GetTargetDimension()
Definition: ViewDatabase2.h:67
const CDatabaseEntry * GetDatabaseEntry() const
Definition: ViewDatabase2.h:69
int GetInputDimension()
Definition: ViewDatabase2.h:66
std::string m_sTransformationMatrixFilename
Definition: ViewDatabase2.h:83
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
bool GetPose(int nView, Transformation3d &pose)
bool ReadConfigurationFile(const char *pBasePath)
static bool ReadData(const char *pFileName, float *pData, int nExpectedDimension)
std::string m_sEigenvalueMatrixFilename
Definition: ViewDatabase2.h:82
int GetNumberOfSamples()
Definition: ViewDatabase2.h:68
std::string m_sConfigurationFilename
Definition: ViewDatabase2.h:90
bool Init(const char *pBasePath, const char *pPathPrefix=0, std::string overrideClassName="")
Data structure for the representation of a matrix of values of the data type float.
Definition: FloatMatrix.h:56
GLsizei const GLchar ** string
Definition: glext.h:3528
int FindBestMatch(const CFloatMatrix *pInputData, float &error) const
bool LearnTrainingData()
void DeleteMatrices()
std::string m_sFullTransformationMatrixFilename
Definition: ViewDatabase2.h:81
bool GetView(int nGlobalIndex, int &nResultClass, int &nResultView)
static void NormalizeIntensity(float *pData, int nLength)
CFloatMatrix * m_pTrainedData
Definition: ViewDatabase2.h:93
CDatabaseEntry * m_pDatabaseEntry
Definition: ViewDatabase2.h:95
CFloatMatrix * m_pTransformationMatrix
Definition: ViewDatabase2.h:92
static void Normalize(const CByteImage *pInputImage, CByteImage *pOutputImage, const MyRegion &region)
std::string m_sTrainingDataFilename
Definition: ViewDatabase2.h:84
Data structure for the representation of a 3D rigid body transformation.
Definition: Math3d.h:105
bool WriteConfigurationFile(const char *pConfigurationFilename)


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