class TextureTracker More...
#include <TextureTracker.h>
Public Member Functions | |
virtual void | drawModelEntry (ModelEntry *modelEntry, float linewidth=1.0f) |
virtual void | drawResult (float linewidth=2.0f) |
Draw all models. | |
virtual void | drawTrackerModel (int id, const TomGine::tgPose &p, float linewidth=1.0f) |
virtual float | evaluateParticle (ModelEntry *modelEntry) |
virtual float | evaluateParticle (ModelEntry *modelEntry, Shader *shader) |
virtual void | evaluatePDF (int id, float x_min, float y_min, float x_max, float y_max, int res, const char *meshfile, const char *xfile) |
cv::Mat | getModelTexture () |
virtual std::vector< float > | getPDFxy (ModelEntry *modelEntry, float x_min, float y_min, float x_max, float y_max, int res) |
virtual void | image_processing (unsigned char *image, GLenum format=GL_BGR) |
Perform image processing with edge detection. | |
virtual void | image_processing (unsigned char *image, const TomGine::tgModel &m, const TomGine::tgPose &p, GLenum format=GL_BGR) |
Perform image processing with edge detection, painting a virtual object into the image. | |
virtual void | image_processing (unsigned char *image, int model_id, const TomGine::tgPose &p, GLenum format=GL_BGR) |
Perform image processing with edge detection, painting the model with id as virtual object into image. | |
virtual bool | initInternal () |
virtual void | savePDF (std::vector< float > vPDFMap, float x_min, float y_min, float x_max, float y_max, unsigned res, const char *meshfile, const char *xfile) |
virtual void | setColorShader () |
virtual void | setEdgeShader () |
virtual void | setKernelSize (int val) |
virtual void | textureFromImage (bool use_num_pixels=true) |
Captures image and attaches it to model as texture. | |
virtual void | textureFromImage (int id, const TomGine::tgPose &pose, bool use_num_pixels=true) |
TextureTracker () | |
virtual bool | track () |
Tracks all models by matching their edges against edges of images. | |
bool | track (ModelEntry *modelEntry) |
virtual bool | track (int id) |
Tracks model by id by matching their edges against edges of images. | |
virtual void | untextureModels () |
Remove textures from model. | |
~TextureTracker () | |
Private Member Functions | |
void | model_processing (ModelEntry *modelEntry) |
void | particle_filtering (ModelEntry *modelEntry) |
Private Attributes | |
Shader * | m_shadeCompare |
Shader * | m_shadeConfidenceMM |
Shader * | m_shadeTexColorTest |
Shader * | m_shadeTexEdgeTest |
Texture * | m_tex_frame_cmp |
Texture * | m_tex_model |
Texture * | m_tex_model_cmp |
std::vector< Texture * > | m_tex_model_ip |
class TextureTracker
Definition at line 18 of file TextureTracker.h.
Definition at line 174 of file TextureTracker.cpp.
Definition at line 183 of file TextureTracker.cpp.
void TextureTracker::drawModelEntry | ( | ModelEntry * | modelEntry, |
float | linewidth = 1.0f |
||
) | [virtual] |
Definition at line 663 of file TextureTracker.cpp.
void TextureTracker::drawResult | ( | float | linewidth = 2.0f | ) | [virtual] |
void TextureTracker::drawTrackerModel | ( | int | id, |
const TomGine::tgPose & | p, | ||
float | linewidth = 1.0f |
||
) | [virtual] |
Reimplemented from Tracking::Tracker.
Definition at line 709 of file TextureTracker.cpp.
float TextureTracker::evaluateParticle | ( | ModelEntry * | modelEntry | ) | [virtual] |
Definition at line 273 of file TextureTracker.cpp.
float TextureTracker::evaluateParticle | ( | ModelEntry * | modelEntry, |
Shader * | shader | ||
) | [virtual] |
Definition at line 279 of file TextureTracker.cpp.
void TextureTracker::evaluatePDF | ( | int | id, |
float | x_min, | ||
float | y_min, | ||
float | x_max, | ||
float | y_max, | ||
int | res, | ||
const char * | meshfile, | ||
const char * | xfile | ||
) | [virtual] |
Reimplemented from Tracking::Tracker.
Definition at line 746 of file TextureTracker.cpp.
cv::Mat TextureTracker::getModelTexture | ( | ) |
Definition at line 958 of file TextureTracker.cpp.
vector< float > TextureTracker::getPDFxy | ( | ModelEntry * | modelEntry, |
float | x_min, | ||
float | y_min, | ||
float | x_max, | ||
float | y_max, | ||
int | res | ||
) | [virtual] |
Definition at line 765 of file TextureTracker.cpp.
void TextureTracker::image_processing | ( | unsigned char * | image, |
GLenum | format = GL_BGR |
||
) | [virtual] |
Perform image processing with edge detection.
image | image data |
format | data format |
Implements Tracking::Tracker.
Definition at line 342 of file TextureTracker.cpp.
void TextureTracker::image_processing | ( | unsigned char * | image, |
const TomGine::tgModel & | model, | ||
const TomGine::tgPose & | pose, | ||
GLenum | format = GL_BGR |
||
) | [virtual] |
Perform image processing with edge detection, painting a virtual object into the image.
image | image data |
model | geometry of virtual object |
pose | position and orientation of the virtual object in world space |
format | data format |
Implements Tracking::Tracker.
Definition at line 365 of file TextureTracker.cpp.
void TextureTracker::image_processing | ( | unsigned char * | image, |
int | model_id, | ||
const TomGine::tgPose & | pose, | ||
GLenum | format = GL_BGR |
||
) | [virtual] |
Perform image processing with edge detection, painting the model with id as virtual object into image.
image | image data |
model_id | id of the model |
pose | position and orientation of the virtual object in world space |
format | data format |
Implements Tracking::Tracker.
Definition at line 395 of file TextureTracker.cpp.
bool TextureTracker::initInternal | ( | ) | [virtual] |
Implements Tracking::Tracker.
Definition at line 191 of file TextureTracker.cpp.
void TextureTracker::model_processing | ( | ModelEntry * | modelEntry | ) | [private] |
Definition at line 15 of file TextureTracker.cpp.
void TextureTracker::particle_filtering | ( | ModelEntry * | modelEntry | ) | [private] |
Definition at line 81 of file TextureTracker.cpp.
void TextureTracker::savePDF | ( | std::vector< float > | vPDFMap, |
float | x_min, | ||
float | y_min, | ||
float | x_max, | ||
float | y_max, | ||
unsigned | res, | ||
const char * | meshfile, | ||
const char * | xfile | ||
) | [virtual] |
Definition at line 822 of file TextureTracker.cpp.
virtual void Tracking::TextureTracker::setColorShader | ( | ) | [inline, virtual] |
Reimplemented from Tracking::Tracker.
Definition at line 52 of file TextureTracker.h.
virtual void Tracking::TextureTracker::setEdgeShader | ( | ) | [inline, virtual] |
Reimplemented from Tracking::Tracker.
Definition at line 49 of file TextureTracker.h.
virtual void Tracking::TextureTracker::setKernelSize | ( | int | val | ) | [inline, virtual] |
Reimplemented from Tracking::Tracker.
Definition at line 42 of file TextureTracker.h.
void TextureTracker::textureFromImage | ( | bool | force = true | ) | [virtual] |
Captures image and attaches it to model as texture.
Reimplemented from Tracking::Tracker.
Definition at line 561 of file TextureTracker.cpp.
void TextureTracker::textureFromImage | ( | int | id, |
const TomGine::tgPose & | pose, | ||
bool | use_num_pixels = true |
||
) | [virtual] |
Reimplemented from Tracking::Tracker.
Definition at line 601 of file TextureTracker.cpp.
bool TextureTracker::track | ( | ) | [virtual] |
Tracks all models by matching their edges against edges of images.
Implements Tracking::Tracker.
Definition at line 443 of file TextureTracker.cpp.
bool TextureTracker::track | ( | ModelEntry * | modelEntry | ) |
Definition at line 506 of file TextureTracker.cpp.
bool TextureTracker::track | ( | int | id | ) | [virtual] |
Tracks model by id by matching their edges against edges of images.
id | the id of the model given by addModel() or addModelFromFile() |
Implements Tracking::Tracker.
Definition at line 537 of file TextureTracker.cpp.
void TextureTracker::untextureModels | ( | ) | [virtual] |
Remove textures from model.
Reimplemented from Tracking::Tracker.
Definition at line 636 of file TextureTracker.cpp.
Shader* Tracking::TextureTracker::m_shadeCompare [private] |
Definition at line 26 of file TextureTracker.h.
Definition at line 25 of file TextureTracker.h.
Definition at line 24 of file TextureTracker.h.
Definition at line 23 of file TextureTracker.h.
Texture* Tracking::TextureTracker::m_tex_frame_cmp [private] |
Definition at line 29 of file TextureTracker.h.
Texture* Tracking::TextureTracker::m_tex_model [private] |
Definition at line 27 of file TextureTracker.h.
Texture* Tracking::TextureTracker::m_tex_model_cmp [private] |
Definition at line 30 of file TextureTracker.h.
Definition at line 28 of file TextureTracker.h.