Recognizer for 3D pose estimation using SIFT features. More...
#include <Recognizer3D.h>
Public Member Functions | |
unsigned int | getCodeBookSize () |
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 | |
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, TomGine::tgPose &pose, float &conf) |
recognizes a object by using the loaded sift model file | |
Recognizer3D (const CameraParameter &camParam, std::string config_root="", bool display=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< Siftex > | m_lastsiftexlist |
bool | m_model_loaded |
P::Object3D | m_sift_model |
P::ModelObject3D | m_sift_model_learner |
std::vector< Siftex > | m_siftexlist |
CvMat * | pDistortion |
CvMat * | pIntrinsicDistort |
CvMat * | pMapX |
CvMat * | pMapY |
P::DetectGPUSIFT | sift |
Recognizer for 3D pose estimation using SIFT features.
Definition at line 47 of file Recognizer3D.h.
Recognizer3D::Recognizer3D | ( | const CameraParameter & | camParam, |
std::string | config_root = "" , |
||
bool | display = false |
||
) |
Construction of Recognizer.
camParam | camera parameter for camera calibration |
prefix | to be added to every file path |
display | display sifts and found object in a window |
Definition at line 49 of file Recognizer3D.cpp.
Definition at line 111 of file Recognizer3D.cpp.
blortRecognizer::Recognizer3D::Recognizer3D | ( | ) | [private] |
void Recognizer3D::Convert | ( | P::PoseCv & | p1, |
TomGine::tgPose & | p2 | ||
) | [static] |
Definition at line 33 of file Recognizer3D.cpp.
unsigned int Recognizer3D::getCodeBookSize | ( | ) |
Definition at line 390 of file Recognizer3D.cpp.
cv::Mat blortRecognizer::Recognizer3D::getDebugImage | ( | ) | [inline] |
Definition at line 104 of file Recognizer3D.h.
cv::Mat blortRecognizer::Recognizer3D::getImage | ( | ) | [inline] |
Definition at line 97 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()
pl | 3D point list of sift features (relative to object) |
nl | 3D normal vector list of sift features (in object space) |
Definition at line 93 of file Recognizer3D.h.
void blortRecognizer::Recognizer3D::getSifts | ( | std::vector< Siftex > & | sl | ) | [inline] |
get position and normal vector of sift features in model
pl | 3D point list of sift features (relative to object) |
nl | 3D normal vector list of sift features (in object space) |
Definition at line 88 of file Recognizer3D.h.
bool Recognizer3D::learnSifts | ( | IplImage * | tFrame, |
const TomGine::tgModel & | model, | ||
const TomGine::tgPose & | pose | ||
) |
add sift features to sift model of an object
tFrame | image/pixel map to search for new sift features |
model | shape description of model using faces and vertices (see TomGine::tgModel) |
pose | pose of the model as seen in the image |
Definition at line 254 of file Recognizer3D.cpp.
bool Recognizer3D::loadModelFromFile | ( | const std::string | sift_file | ) |
load a sift model
sift_file | relative path and name to sift file (i.e.: "../Resources/sift/TeaBox.sift") |
Definition at line 374 of file Recognizer3D.cpp.
bool Recognizer3D::recognize | ( | IplImage * | tFrame, |
TomGine::tgPose & | pose, | ||
float & | conf | ||
) |
recognizes a object by using the loaded sift model file
tFrame | Image/Pixel map to search for the sift model |
pose | returned pose of the object (if found) |
conf | returned confidence of pose of the object |
Definition at line 157 of file Recognizer3D.cpp.
bool Recognizer3D::saveModelToFile | ( | const char * | sift_file | ) |
save a sift model
sift_file | relative path and name to sift file (i.e.: "../Resources/sift/TeaBox.sift") |
Definition at line 383 of file Recognizer3D.cpp.
void Recognizer3D::setCameraParameter | ( | const blortRecognizer::CameraParameter & | camParam | ) |
Definition at line 120 of file Recognizer3D.cpp.
void blortRecognizer::Recognizer3D::setDoUndistort | ( | bool | enable | ) | [inline] |
Definition at line 98 of file Recognizer3D.h.
void blortRecognizer::Recognizer3D::setGaussian | ( | int | kernel, |
float | stdDeviation | ||
) | [inline] |
Definition at line 60 of file Recognizer3D.h.
void Recognizer3D::setNNThreshold | ( | double | nn_threshold | ) |
Definition at line 395 of file Recognizer3D.cpp.
void Recognizer3D::setRansacNPointsToMatch | ( | unsigned int | n | ) |
Definition at line 400 of file Recognizer3D.cpp.
CvMat* blortRecognizer::Recognizer3D::C [private] |
Definition at line 121 of file Recognizer3D.h.
std::string blortRecognizer::Recognizer3D::config_root [private] |
Definition at line 135 of file Recognizer3D.h.
cv::Mat blortRecognizer::Recognizer3D::debug_image [private] |
Definition at line 133 of file Recognizer3D.h.
cv::Mat blortRecognizer::Recognizer3D::display_image [private] |
Definition at line 132 of file Recognizer3D.h.
Definition at line 134 of file Recognizer3D.h.
Definition at line 123 of file Recognizer3D.h.
Definition at line 111 of file Recognizer3D.h.
bool blortRecognizer::Recognizer3D::m_display [private] |
Definition at line 126 of file Recognizer3D.h.
float blortRecognizer::Recognizer3D::m_gauss_dev [private] |
Definition at line 129 of file Recognizer3D.h.
int blortRecognizer::Recognizer3D::m_gauss_kernel [private] |
Definition at line 128 of file Recognizer3D.h.
Definition at line 114 of file Recognizer3D.h.
Definition at line 116 of file Recognizer3D.h.
Definition at line 125 of file Recognizer3D.h.
Definition at line 112 of file Recognizer3D.h.
Definition at line 110 of file Recognizer3D.h.
Definition at line 117 of file Recognizer3D.h.
CvMat* blortRecognizer::Recognizer3D::pDistortion [private] |
Definition at line 120 of file Recognizer3D.h.
CvMat* blortRecognizer::Recognizer3D::pIntrinsicDistort [private] |
Definition at line 119 of file Recognizer3D.h.
CvMat* blortRecognizer::Recognizer3D::pMapX [private] |
Definition at line 122 of file Recognizer3D.h.
CvMat * blortRecognizer::Recognizer3D::pMapY [private] |
Definition at line 122 of file Recognizer3D.h.
Definition at line 109 of file Recognizer3D.h.