Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _VIEW_DATABASE2_H_
00012 #define _VIEW_DATABASE2_H_
00013
00014
00015
00016
00017
00018
00019 #include <string>
00020 #include "DatabaseEntry.h"
00021 #include "DataStructures/DynamicArray.h"
00022
00023
00024
00025
00026
00027
00028 class CFloatMatrix;
00029 class CByteImage;
00030 struct MyRegion;
00031 struct Vec3d;
00032
00033
00034
00035
00036
00037
00038
00039 class CViewDatabase2 : public CDynamicArrayElement
00040 {
00041 public:
00042
00043 CViewDatabase2();
00044
00045
00046 ~CViewDatabase2();
00047
00048
00049
00050
00051
00052 bool Init(const char *pBasePath, const char* pPathPrefix = 0, std::string overrideClassName = "");
00053 bool InitRecognition();
00054 bool LearnTrainingData();
00055 int FindBestMatch(const CFloatMatrix *pInputData, float &error) const;
00056 bool GetView(int nGlobalIndex, int &nResultClass, int &nResultView);
00057 bool GetPose(int nView, Transformation3d &pose);
00058
00059
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 ®ion);
00063 static void NormalizeIntensity(float *pData, int nLength);
00064
00065
00066 int GetInputDimension() { return m_nInputDimension; }
00067 int GetTargetDimension() { return m_nTargetDimension; }
00068 int GetNumberOfSamples() { return m_nSamples; }
00069 const CDatabaseEntry* GetDatabaseEntry() const { return m_pDatabaseEntry; }
00070
00071
00072
00073 private:
00074
00075 void DeleteMatrices();
00076 bool ReadConfigurationFile(const char *pBasePath);
00077 bool WriteConfigurationFile(const char *pConfigurationFilename);
00078
00079
00080
00081 std::string m_sFullTransformationMatrixFilename;
00082 std::string m_sEigenvalueMatrixFilename;
00083 std::string m_sTransformationMatrixFilename;
00084 std::string m_sTrainingDataFilename;
00085
00086 int m_nInputDimension;
00087 int m_nTargetDimension;
00088 int m_nSamples;
00089
00090 std::string m_sConfigurationFilename;
00091
00092 CFloatMatrix *m_pTransformationMatrix;
00093 CFloatMatrix *m_pTrainedData;
00094
00095 CDatabaseEntry *m_pDatabaseEntry;
00096 };
00097
00098
00099
00100 #endif
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