SegmentableDatabase.h
Go to the documentation of this file.
1 // *****************************************************************
2 // Filename: SegmentableDatabase.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: 03.12.2007
8 // *****************************************************************
9 
10 
11 #ifndef _SEGMENTABLE_DATABASE_H_
12 #define _SEGMENTABLE_DATABASE_H_
13 
14 
15 // *****************************************************************
16 // necessary includes
17 // *****************************************************************
18 
19 #include <string>
20 #include <map>
21 
22 
23 // *****************************************************************
24 // forward class declarations
25 // *****************************************************************
26 
27 class CByteImage;
28 class CFloatMatrix;
29 class CDynamicArray;
30 class COpenGLVisualizer;
32 class CStereoCalibration;
33 class CDatabaseEntry;
34 struct Transformation3d;
35 struct Mat3d;
36 struct Vec3d;
37 
38 
39 
40 // *****************************************************************
41 // CSegmentableDatabase
42 // *****************************************************************
43 
45 {
46 public:
47  // constructor
49 
50  // destructor
52 
53 
54  // public methods
55 
56  // for recognition
57  bool Init(const char *pConfigurationFilename, const char *pCameraParameterFilename, const char* pViewDataBasePathPrefix = 0);
58  bool Init(const char *pConfigurationFilename, CStereoCalibration* pStereoCalibration, const char* pViewDataBasePathPrefix = 0);
59  bool Init(CStereoCalibration* pStereoCalibration);
60  bool AddClass(const std::string& classPath, const std::string& dataBasePrefix, std::string overrideClassName = "");
61 
62  void SetStereoCalibration(CStereoCalibration *pStereoCalibration);
63  bool FindBestMatch(const CFloatMatrix *pInputData, const CByteImage *pMask, const Vec3d &initialPosition, int nSize,
64  Transformation3d &resultPose, float &fResultError, int &nResultClass, int &nResultView, float &fResultRatio, float &fResultCorrelation,
65  const char *pObjectName);
66 
67  // set recognition thresholds
68  void SetRecognitionThresholds(float fSizeRatioThreshold, float fCorrelationThreshold);
69 
70  // set verbose mode
71  void SetVerbose(bool bVerbose) { m_bVerbose = bVerbose; }
72 
73  // member access
74  int GetNumberOfClasses();
76  const CDatabaseEntry* GetDatabaseEntry(int nClass);
77 
78  // pose correction
79  bool CalculateCorrectedPosition(const char *pOIVFilePath, const Vec3d &triangulatedPosition, const Mat3d &orientation, const CByteImage *pMask, int nSize,
80  Vec3d &correctedPosition, float &fRatio, float &fCorrelation);
81  void CalculateCorrectedOrientation(const Vec3d &position, const Mat3d &orientation, Mat3d &resultOrientation);
82 
83  // static methods
84  static bool DrawObjectFromFile(COpenGLVisualizer *pVisualizer, const char *pOIVFilePath, const Transformation3d &pose);
85  static void Cleanup(); // call this method at the end of your programm to free memory for static objects
86 
87 
88 private:
89  // private methods
90  int SimulateSize(const char *pOIVFilePath, const Transformation3d &pose, CByteImage *pObjectImage);
91  bool InitDatabase(const char *pConfigurationFilename, const char* pViewDataBasePathPrefix = 0);
92 
93  // private attributes
96 
99 
102 
104 };
105 
106 
107 
108 #endif /* _SEGMENTABLE_DATABASE_H_ */
void SetStereoCalibration(CStereoCalibration *pStereoCalibration)
CObjectFinderStereo * m_pObjectFinderStereo
bool CalculateCorrectedPosition(const char *pOIVFilePath, const Vec3d &triangulatedPosition, const Mat3d &orientation, const CByteImage *pMask, int nSize, Vec3d &correctedPosition, float &fRatio, float &fCorrelation)
void SetRecognitionThresholds(float fSizeRatioThreshold, float fCorrelationThreshold)
int SimulateSize(const char *pOIVFilePath, const Transformation3d &pose, CByteImage *pObjectImage)
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
static void Cleanup()
void CalculateCorrectedOrientation(const Vec3d &position, const Mat3d &orientation, Mat3d &resultOrientation)
const CDatabaseEntry * GetDatabaseEntry(int nClass)
Data structure for the representation of a matrix of values of the data type float.
Definition: FloatMatrix.h:56
CDynamicArray * m_pViewDatabaseList
bool Init(const char *pConfigurationFilename, const char *pCameraParameterFilename, const char *pViewDataBasePathPrefix=0)
GLsizei const GLchar ** string
Definition: glext.h:3528
bool AddClass(const std::string &classPath, const std::string &dataBasePrefix, std::string overrideClassName="")
Camera model and functions for a stereo camera system.
static bool DrawObjectFromFile(COpenGLVisualizer *pVisualizer, const char *pOIVFilePath, const Transformation3d &pose)
bool InitDatabase(const char *pConfigurationFilename, const char *pViewDataBasePathPrefix=0)
COpenGLVisualizer * m_pOpenGLVisualizer
Data structure for the representation of a 3x3 matrix.
Definition: Math3d.h:93
void SetVerbose(bool bVerbose)
Data structure for the representation of a 3D rigid body transformation.
Definition: Math3d.h:105
bool FindBestMatch(const CFloatMatrix *pInputData, const CByteImage *pMask, const Vec3d &initialPosition, int nSize, Transformation3d &resultPose, float &fResultError, int &nResultClass, int &nResultView, float &fResultRatio, float &fResultCorrelation, const char *pObjectName)


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