Public Types | |
Public Member Functions | |
virtual modalities::Modality * | clone () const |
Creates an additional copy of this class instance. | |
ColourHist2D (const ColourHist2D &c) | |
Copy Constructor (deep copy). | |
ColourHist2D (opentl::modelprojection::Warp *warp, int camIdx, opentl::modelprojection::GLRenderer *renderer=NULL) | |
Constructor. | |
virtual int | copyMTrack2MDetect (const TargetPtrVector *targets) |
Copy the on-line histogram (Mtrack) into the off-line one (Mdetect). | |
void | getRotatedImageOfLink (const boost::shared_ptr< opentl::core::State > state, models::ObjModel &objModel, double &x, double &y, double &width, double &height, int linkIdx) |
Compute the rotated bounding box of one or more faces, and fills a binary mask (white inside the rotated box, black outside) NOTE: the mask image is processed only within the bounding region of the projected face, while the rest is left unchanged. | |
virtual void | init () |
Initialization function. | |
virtual int | matchFeatLevel (const TargetPtrVector &targets, T_MEAS_FEATPtrVector &outputMeas, std::size_t partitionIdx) |
Match model and image color histograms, under a given pose hypothesis. | |
virtual int | preProcess (const opentl::core::cvdata::Image &image) |
Converts a given Image into the specified color space To specify the destination color space, please use the param construct. | |
virtual int | sampleModelFeatures (const TargetPtrVector &targets) |
Sample color histogram from shape and appearance model, at given pose. | |
void | setMeasStd (double std) |
Set measurement covariance. | |
virtual int | updateModelFeatures (const TargetPtrVector &targets) |
Update on-line color histogram from pre-processed image, at given pose. | |
virtual | ~ColourHist2D () |
Destructor. | |
Static Public Attributes | |
static std::vector < std::vector< std::vector < opentl::core::cvdata::ColourHist2d > > > | mColourHist2DFeatures_z |
Storage for _temp._ image color histogram First camera index, 2nd target id, 3rd face index. | |
static std::vector < std::vector< std::vector < opentl::core::cvdata::ColourHist2d > > > | mColourHist2DMdetect |
Storage for reference color histogram (off-line, from SampleModelFeatures) One histogram per: target and patch The first index specifies the camera index, the second index specifies the targetid, 3rd index faceid. | |
static std::vector < std::vector< std::vector < opentl::core::cvdata::ColourHist2d > > > | mColourHist2DMtrack |
Storage for reference color histogram (on-line, from UpdateModelFeatures) One histogram per: target and patch The first index specifies the camera index, the second index specifies the targetid, 3rd index faceid. | |
static std::vector < boost::shared_ptr < opentl::core::cvdata::Image > > | mColourHist2DStaticDataImage |
static std::vector < boost::shared_ptr < cvprocess::ColorHistShader > > | mHistoShaders |
Shader for computing the color histogram on the GPU. | |
static std::vector < boost::shared_ptr < opentl::core::cvdata::TextureGpu > > | mInputTextures |
Texture to copy the input image on the GPU. | |
static std::vector < boost::shared_ptr < opentl::core::cvdata::TextureGpu > > | mShadowTextures |
Texture for the object shadow (mask) GPU. | |
Protected Member Functions | |
virtual void | getImageHistogram (const boost::shared_ptr< opentl::core::State > state, models::ObjModel &objModel, std::vector< opentl::core::cvdata::ColourHist2d > &MDestination) |
Sample color histogram from image pixels, using either CPU- or GPU-based implementation, for a given shadow type. |
Parameters for visual processing in this class.
Reimplemented from opentl::modalities::Modality.
Reimplemented from opentl::modalities::Modality.
opentl::modalities::ColourHist2D::ColourHist2D | ( | opentl::modelprojection::Warp * | warp, | |
int | camIdx, | |||
opentl::modelprojection::GLRenderer * | renderer = NULL | |||
) |
Constructor.
warp | Warp instance | |
camIdx | Camera index | |
Pointer | to the GLRenderer instance, if the full object shadow is used while sampling the histogram |
opentl::modalities::ColourHist2D::ColourHist2D | ( | const ColourHist2D & | c | ) |
Copy Constructor (deep copy).
virtual opentl::modalities::ColourHist2D::~ColourHist2D | ( | ) | [virtual] |
Destructor.
virtual modalities::Modality* opentl::modalities::ColourHist2D::clone | ( | ) | const [virtual] |
virtual int opentl::modalities::ColourHist2D::copyMTrack2MDetect | ( | const TargetPtrVector * | targets | ) | [virtual] |
Copy the on-line histogram (Mtrack) into the off-line one (Mdetect).
targets | Vector of targets |
virtual void opentl::modalities::ColourHist2D::getImageHistogram | ( | const boost::shared_ptr< opentl::core::State > | state, | |
models::ObjModel & | objModel, | |||
std::vector< opentl::core::cvdata::ColourHist2d > & | MDestination | |||
) | [protected, virtual] |
Sample color histogram from image pixels, using either CPU- or GPU-based implementation, for a given shadow type.
state | Object state (single-target) | |
objModel | Object model | |
MDestination | Destination histogram |
void opentl::modalities::ColourHist2D::getRotatedImageOfLink | ( | const boost::shared_ptr< opentl::core::State > | state, | |
models::ObjModel & | objModel, | |||
double & | x, | |||
double & | y, | |||
double & | width, | |||
double & | height, | |||
int | linkIdx | |||
) |
Compute the rotated bounding box of one or more faces, and fills a binary mask (white inside the rotated box, black outside) NOTE: the mask image is processed only within the bounding region of the projected face, while the rest is left unchanged.
state | State hypothesis | |
objModel | Object model | |
(x,y,width,height) | Output coordinates of the upright bounding box | |
linkIdx | Link Id |
virtual void opentl::modalities::ColourHist2D::init | ( | ) | [virtual] |
virtual int opentl::modalities::ColourHist2D::matchFeatLevel | ( | const TargetPtrVector & | targets, | |
T_MEAS_FEATPtrVector & | outputMeas, | |||
std::size_t | partitionIdx | |||
) | [virtual] |
Match model and image color histograms, under a given pose hypothesis.
targets | Vector of targets | |
outputMeas | Each one is a set of Bhattacharyya distances (residuals) between model and image histograms, for all patches |
Reimplemented from opentl::modalities::Modality.
virtual int opentl::modalities::ColourHist2D::preProcess | ( | const opentl::core::cvdata::Image & | image | ) | [virtual] |
Converts a given Image into the specified color space To specify the destination color space, please use the param construct.
sensData | Image to convert (must be RGB atm) |
virtual int opentl::modalities::ColourHist2D::sampleModelFeatures | ( | const TargetPtrVector & | targets | ) | [virtual] |
Sample color histogram from shape and appearance model, at given pose.
targets | Vector of targets |
Reimplemented from opentl::modalities::Modality.
void opentl::modalities::ColourHist2D::setMeasStd | ( | double | std | ) | [inline] |
Set measurement covariance.
std | standard deviation (in the histogram distance metric) |
virtual int opentl::modalities::ColourHist2D::updateModelFeatures | ( | const TargetPtrVector & | targets | ) | [virtual] |
Update on-line color histogram from pre-processed image, at given pose.
targets | Vector of targets |
Reimplemented from opentl::modalities::Modality.
std::vector<std::vector<std::vector<opentl::core::cvdata::ColourHist2d> > > opentl::modalities::ColourHist2D::mColourHist2DFeatures_z [static] |
Storage for _temp._ image color histogram First camera index, 2nd target id, 3rd face index.
std::vector<std::vector<std::vector<opentl::core::cvdata::ColourHist2d> > > opentl::modalities::ColourHist2D::mColourHist2DMdetect [static] |
Storage for reference color histogram (off-line, from SampleModelFeatures) One histogram per: target and patch The first index specifies the camera index, the second index specifies the targetid, 3rd index faceid.
std::vector<std::vector<std::vector<opentl::core::cvdata::ColourHist2d> > > opentl::modalities::ColourHist2D::mColourHist2DMtrack [static] |
Storage for reference color histogram (on-line, from UpdateModelFeatures) One histogram per: target and patch The first index specifies the camera index, the second index specifies the targetid, 3rd index faceid.
std::vector<boost::shared_ptr<opentl::core::cvdata::Image> > opentl::modalities::ColourHist2D::mColourHist2DStaticDataImage [static] |
std::vector<boost::shared_ptr<cvprocess::ColorHistShader> > opentl::modalities::ColourHist2D::mHistoShaders [static] |
Shader for computing the color histogram on the GPU.
std::vector<boost::shared_ptr<opentl::core::cvdata::TextureGpu> > opentl::modalities::ColourHist2D::mInputTextures [static] |
Texture to copy the input image on the GPU.
std::vector<boost::shared_ptr<opentl::core::cvdata::TextureGpu> > opentl::modalities::ColourHist2D::mShadowTextures [static] |
Texture for the object shadow (mask) GPU.