Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
blortRecognizer::Recognizer3D Class Reference

Recognizer for 3D pose estimation using SIFT features. More...

#include <Recognizer3D.h>

List of all members.

Public Member Functions

cv::Mat getDebugImage ()
cv::Mat getImage ()
void getLastSifts (std::vector< Siftex > &sl)
 get position and normal vector of sift features in model detected in the last call of learnSifts()
void getSifts (std::vector< Siftex > &sl)
 get position and normal vector of sift features in model
void initTrainingModel ()
 Creates a model for the training phase.
bool learnSifts (IplImage *tFrame, const TomGine::tgModel &model, const TomGine::tgPose &pose)
 add sift features to sift model of an object
bool loadModelFromFile (const std::string sift_file)
 load a sift model
bool recognize (IplImage *tFrame, std::map< std::string, boost::shared_ptr< TomGine::tgPose > > &poses, std::map< std::string, double > &confs)
 recognizes a object by using the loaded sift model file
bool recognize (IplImage *tFrame, std::map< std::string, boost::shared_ptr< TomGine::tgPose > > &poses, std::map< std::string, double > &confs, const std::map< std::string, bool > &select)
 recognizes a object by using the loaded sift model file
 Recognizer3D (const CameraParameter &camParam, std::string config_root="", bool display=false, bool training=false)
 Construction of Recognizer.
bool saveModelToFile (const char *sift_file)
 save a sift model
void setCameraParameter (const blortRecognizer::CameraParameter &camParam)
void setDoUndistort (bool enable)
void setGaussian (int kernel, float stdDeviation)
void setNNThreshold (double nn_threshold)
void setRansacNPointsToMatch (unsigned int n)
 ~Recognizer3D ()

Static Public Member Functions

static void Convert (P::PoseCv &p1, TomGine::tgPose &p2)

Private Member Functions

 Recognizer3D ()

Private Attributes

CvMat * C
std::string config_root
cv::Mat debug_image
cv::Mat display_image
bool do_undistort
CameraParameter m_cp
P::ODetect3D m_detect
bool m_display
float m_gauss_dev
int m_gauss_kernel
P::Array< P::KeypointDescriptor * > m_image_keys
std::vector< Siftexm_lastsiftexlist
bool m_model_loaded
P::ModelObject3D m_sift_model_learner
std::vector< boost::shared_ptr
< P::Object3D > > 
m_sift_models
std::vector< Siftexm_siftexlist
CvMat * pDistortion
CvMat * pIntrinsicDistort
CvMat * pMapX
CvMat * pMapY
P::DetectGPUSIFT sift

Detailed Description

Recognizer for 3D pose estimation using SIFT features.

Definition at line 47 of file Recognizer3D.h.


Constructor & Destructor Documentation

Recognizer3D::Recognizer3D ( const CameraParameter camParam,
std::string  config_root = "",
bool  display = false,
bool  training = false 
)

Construction of Recognizer.

Parameters:
camParamcamera parameter for camera calibration
prefixto be added to every file path
displaydisplay sifts and found object in a window

Definition at line 56 of file Recognizer3D.cpp.

Definition at line 122 of file Recognizer3D.cpp.


Member Function Documentation

void Recognizer3D::Convert ( P::PoseCv p1,
TomGine::tgPose p2 
) [static]

Definition at line 40 of file Recognizer3D.cpp.

Definition at line 116 of file Recognizer3D.h.

Definition at line 109 of file Recognizer3D.h.

void blortRecognizer::Recognizer3D::getLastSifts ( std::vector< Siftex > &  sl) [inline]

get position and normal vector of sift features in model detected in the last call of learnSifts()

Parameters:
pl3D point list of sift features (relative to object)
nl3D normal vector list of sift features (in object space)

Definition at line 106 of file Recognizer3D.h.

void blortRecognizer::Recognizer3D::getSifts ( std::vector< Siftex > &  sl) [inline]

get position and normal vector of sift features in model

Parameters:
pl3D point list of sift features (relative to object)
nl3D normal vector list of sift features (in object space)

Definition at line 101 of file Recognizer3D.h.

Creates a model for the training phase.

Definition at line 414 of file Recognizer3D.cpp.

bool Recognizer3D::learnSifts ( IplImage *  tFrame,
const TomGine::tgModel model,
const TomGine::tgPose pose 
)

add sift features to sift model of an object

Parameters:
tFrameimage/pixel map to search for new sift features
modelshape description of model using faces and vertices (see TomGine::tgModel)
posepose of the model as seen in the image

Definition at line 284 of file Recognizer3D.cpp.

bool Recognizer3D::loadModelFromFile ( const std::string  sift_file)

load a sift model

Parameters:
sift_filerelative path and name to sift file (i.e.: "../Resources/sift/TeaBox.sift")
Returns:
success of loading the file

Definition at line 404 of file Recognizer3D.cpp.

bool Recognizer3D::recognize ( IplImage *  tFrame,
std::map< std::string, boost::shared_ptr< TomGine::tgPose > > &  poses,
std::map< std::string, double > &  confs 
)

recognizes a object by using the loaded sift model file

Parameters:
tFrameImage/Pixel map to search for the sift model
posereturned pose of the object (if found)
confreturned confidence of pose of the object
Returns:
true if object found, false if not

Definition at line 168 of file Recognizer3D.cpp.

bool Recognizer3D::recognize ( IplImage *  tFrame,
std::map< std::string, boost::shared_ptr< TomGine::tgPose > > &  poses,
std::map< std::string, double > &  confs,
const std::map< std::string, bool > &  select 
)

recognizes a object by using the loaded sift model file

Parameters:
tFrameImage/Pixel map to search for the sift model
posereturned pose of the object (if found)
confreturned confidence of pose of the object
selectobjects in this vector will be recognized
Returns:
true if object found, false if not

Definition at line 176 of file Recognizer3D.cpp.

bool Recognizer3D::saveModelToFile ( const char *  sift_file)

save a sift model

Parameters:
sift_filerelative path and name to sift file (i.e.: "../Resources/sift/TeaBox.sift")
Returns:
success of saving the file

Definition at line 420 of file Recognizer3D.cpp.

Definition at line 131 of file Recognizer3D.cpp.

void blortRecognizer::Recognizer3D::setDoUndistort ( bool  enable) [inline]

Definition at line 110 of file Recognizer3D.h.

void blortRecognizer::Recognizer3D::setGaussian ( int  kernel,
float  stdDeviation 
) [inline]

Definition at line 61 of file Recognizer3D.h.

void Recognizer3D::setNNThreshold ( double  nn_threshold)

Definition at line 427 of file Recognizer3D.cpp.

void Recognizer3D::setRansacNPointsToMatch ( unsigned int  n)

Definition at line 432 of file Recognizer3D.cpp.


Member Data Documentation

Definition at line 137 of file Recognizer3D.h.

Definition at line 151 of file Recognizer3D.h.

Definition at line 149 of file Recognizer3D.h.

Definition at line 148 of file Recognizer3D.h.

Definition at line 150 of file Recognizer3D.h.

Definition at line 139 of file Recognizer3D.h.

Definition at line 125 of file Recognizer3D.h.

Definition at line 142 of file Recognizer3D.h.

Definition at line 145 of file Recognizer3D.h.

Definition at line 144 of file Recognizer3D.h.

Definition at line 130 of file Recognizer3D.h.

Definition at line 132 of file Recognizer3D.h.

Definition at line 141 of file Recognizer3D.h.

Definition at line 123 of file Recognizer3D.h.

std::vector< boost::shared_ptr<P::Object3D> > blortRecognizer::Recognizer3D::m_sift_models [private]

Definition at line 127 of file Recognizer3D.h.

Definition at line 133 of file Recognizer3D.h.

Definition at line 136 of file Recognizer3D.h.

Definition at line 135 of file Recognizer3D.h.

Definition at line 138 of file Recognizer3D.h.

Definition at line 138 of file Recognizer3D.h.

Definition at line 121 of file Recognizer3D.h.


The documentation for this class was generated from the following files:


blort
Author(s): Thomas Mörwald , Michael Zillich , Andreas Richtsfeld , Johann Prankl , Markus Vincze , Bence Magyar
autogenerated on Wed Aug 26 2015 15:24:12